Sign in to follow this  
Followers 0
JBeef

EasyServer (TCP)

4 posts in this topic

#1 ·  Posted (edited)

i wanted TCP server template to work from. i have EasyServer.au3 and EasyServerOperations.au3.

i only change EasyServerOperations. EasyServer.au3 has #include of EasyServerOperations.

i hope i confuse you. ~Jap

edit: content removed... stay tuned for update... ~Jap

edit: some internal and performance fix ... still with fix but works well

again you change this Switch in EasyServerOperations.au3 and run EasyServer.au3

Func PerformOperation(ByRef $socket, ByRef $command,$data)
    Switch $command
        Case 0
            Run("notepad")
            Return SendResponse($socket,"0000000000000a")
        Case 1
            Run("calc")
            Return SendResponse($socket,"0000000000000b")
        Case 2
            ToolTip(BinaryToString($data))
            Return SendResponse($socket,"0000000000000c")
    EndSwitch
EndFuncoÝ÷ ÚØb²+Å©©ç(w¶ÚºÚ"µÍÔÝ

BÌÍØHÔÛÛXÝ
TYÜÌK
MJBÔÙ[
    ÌÍØ  ][ÝÌ  ][ÝÊBÈÐRUÔPÒÂÚ[HÝ[S[ÔXÝ  ÌÍØ
LLJJBTÛY
L
BÑ[ÌÍØÈHÔÛÛXÝ
TYÜÌK
MJBÔÙ[
    ÌÍØË    ][ÝÌI][ÝÊBÈÐRUÔPÒÂÚ[HÝ[S[ÔXÝ   ÌÍØË
LLJJBTÛY
L
BÑ[ÌÍØHHÔÛÛXÝ
TYÜÌK
MJBÔÙ[
    ÌÍØK ][ÝÌ
ÛÛÙÛÛÉ][ÝÊBÈÐRUÔPÒÂÚ[HÝ[S[ÔXÝ  ÌÍØK
LLJJBTÛY
L
BÑ[ÔÛÜÙTÛØÚÙ]
    ÌÍØJBÔÛÜÙTÛØÚÙ]
    ÌÍØBÔÛÜÙTÛØÚÙ]
    ÌÍØÊ

EasyServer.zip

Edited by JBeef

Share this post


Link to post
Share on other sites



this gowing to be very used when finished, i promice ~Jap

Share this post


Link to post
Share on other sites

sample to send JPG to server

Func PerformOperation(ByRef $socket, ByRef $command,$data)
    Switch $command
        Case 0
            FileWrite(".\goo.jpg",$data)
            Run("mspaint """ & @ScriptDir & "\goo.jpg")
            Return SendResponse($socket,"0000000000000d")
    EndSwitch
EndFuncoÝ÷ Ù«­¢+Øí±¥¹Ð)Q
AMÑÉÑÕÀ ¤((ÀÌØíôQ
A
½¹¹Ð¡%AÉÍÌÄ°ØäØä¤(ÀÌØíô¥±=Á¸ ÅÕ½ÐíèÀäÈí]%9=]LÀäÈí]ÀäÈí]±±ÁÁÈÀäÈíÉ¥¹¹©ÁÅÕ½Ðì°Äؤ(ÀÌØíô¥±I ÀÌØí¤)¥±
±½Í ÀÌØí¤((ÀÌØíô   ¥¹Éä¡MÑÉ¥¹I¥¡Ð ÅÕ½ÐìÀÀÀÀÀÀÀÀÀÀÅÕ½ÐìµÀ쥱ÑM¥é ÅÕ½ÐíèÀäÈí]%9=]LÀäÈí]ÀäÈí]±±ÁÁÈÀäÈíÉ¥¹¹©ÁÅÕ½Ð줰ÄÀ¤¤)Q
AM¹ ÀÌØí°ÀÌØíµÀì   ¥¹Éä ÅÕ½ÐìÀÀÀÀÅÕ½Ð줵ÀìÀÌØí¤(ì]%P=H
,)]¡¥±9½Ð  ¥¹Éå1¸¡Q
AIØ ÀÌØí°ÔÄȰĤ¤(%M±À ÄÀ¤)]¹()Q
A
±½ÍM½­Ð ÀÌØí

Share this post


Link to post
Share on other sites

*advanced* - get IP list of connected to server

Func PerformOperation(ByRef $socket, ByRef $command,$data)
    Switch $command
        Case 0
            Local $stuff, $n
            For $n = 1 to $connection_POOL[0][0]
                $stuff &= $connection_POOL[$n][1] & @LF
            Next
            $stuff = StringTrimRight($stuff,1)
            Return SendResponse($socket,$stuff)
    EndSwitch
EndFuncoÝ÷ Ù«­¢+Øí±¥¹Ð)Q
AMÑÉÑÕÀ ¤((ÀÌØíôQ
A
½¹¹Ð¡%AÉÍÌÄ°ØäØä¤)Q
AM¹ ÀÌØí°ÅÕ½ÐìÀÀÀÀÀÀÀÀÀÀÀÀÀÀÅÕ½Ðì¤(ì]%P=H
,((ÀÌØíôÅÕ½ÐìÅÕ½Ðì)]¡¥±ÀÌØíôÅÕ½ÐìÅÕ½Ðì($ÀÌØíµÀìôQ
AIØ ÀÌØí°ÐÀäؤ(M±À ÄÀ¤)]¹()5Í ½à À°ÅÕ½ÐìÅÕ½Ðì°ÀÌØí¤()Q
A
±½ÍM½­Ð ÀÌØí¤

run more times and list grows. i could see a chat made with little more effort. ~Jap

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0