Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;client
- Run("sdffsd.exe")
- Sleep(10000)
- MsgBox(0,"","")
- TCPStartup()
- $socket = TCPConnect("127.0.0.2", 4321)
- $socket2 = TCPListen("127.0.0.3", 4322)
- If $socket = -1 Then ;
- MsgBox(16, "Error", "Die Verbindung zum Server konnte nicht hergestellt werden!")
- EndIf
- $sendedBytes = TCPSend($socket, "1")
- While 1
- $acceptedSocket = TCPAccept($socket2)
- ;MsgBox(0,"",$acceptedSockeT)
- If $acceptedSocket <> -1 Then
- $receivedData = TCPRecv($acceptedSocket, 1024)
- MsgBox(0,"",$receiveddata)
- Exit
- EndIf
- WEnd
- TCPCloseSocket($socket)
- TCPShutdown()
- ;server
- TCPStartup()
- $mainsocket = TCPListen("127.0.0.2", 4321)
- While 1
- $acceptedSocket = TCPAccept($mainsocket)
- If $acceptedSocket <> -1 Then
- $receivedData = TCPRecv($acceptedSocket, 1024)
- $socket = TCPConnect("127.0.0.3", 4322)
- $a = TCPSend($socket,"hallo")
- ;MsgBox(0,"",$a)
- ;TCPCloseSocket($acceptedSocket)
- EndIf
- WEnd
Add Comment
Please, Sign In to add comment