Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TCPStartup()
- $MAINSOCKET = TCPListen(@IPAddress1,9999)
- $OPPONENTIP = InputBox("","Bitte die IP des anderen PCs eingeben!")
- If @error Then Exit
- While 1
- $TEMPSOCKET = TCPConnect($OPPONENTIP,9999)
- If $TEMPSOCKET <> -1 Then ExitLoop
- Sleep(100)
- WEnd
- HotKeySet("{ESC}","_Exit")
- HotKeySet("^w","_Send")
- While 1
- $TEMPRECV = TCPRecv($TEMPSOCKET,8192)
- If $TEMPRECV <> "" Then TrayTip("Daten empfangen!",$TEMPRECV,1)
- Sleep(100)
- WEnd
- func _Send()
- $DATA = InputBox("Senden","Text eingeben!")
- If @error Then Return
- TCPSend($TEMPSOCKET,$DATA)
- EndFunc
- func _Exit()
- TCPShutdown()
- Exit
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement