Jump to content

simplest network - how to?


 Share

Recommended Posts

I am on 10.0.1.101 ( my own router network )

and I want to send a line of text to 10.0.1.103

how do I do it?

Example:

;Server!!! Start me first
#include <GUIConstants.au3>

Global $szIPAddress = "127.0.0.1"
Global $TcpPort = 33891

TCPStartup()

$MainSocket = TCPListen($szIPAddress, $TcpPort)
If @error Then Exit
    
;Create a GUI for incoming messages
GUICreate("Chat", 300, 200)
$edit = GUICtrlCreateEdit("", 10, 10, 200, 150)
GUISetState()

Global $Connect = -1

Do
    $Connect = TCPAccept($MainSocket)
    If GUIGetMsg() = -3 Then ExitLoop
Until $Connect <> -1

While 1
    If GUIGetMsg() = -3 Then ExitLoop
        $recv = TCPRecv($Connect, 2048)
        If @error Then ExitLoop
            If $recv <> "" Then GUICtrlSetData($edit, $recv)
                Sleep(30)
            WEndoÝ÷ Ù«­¢+Øí
±¥¹ÐÌÌìÌÌìÌÌìMÑÉÐÑ¡¥ÌÍÉ¥ÁÐÑÈÍÑÉÑ¥¹ÍÉÙÈ()Q
AMÑÉÑÕÀ ¤()±½°ÀÌØíÍé%AÉÍÌôÅÕ½ÐìÄÈܸÀ¸À¸ÄÅÕ½Ðì)±½°ÀÌØíQÁA½ÉÐôÌÌàäÄ)±½°ÀÌØíÍéÑ((ÀÌØí
½¹¹ÐôQ
A
½¹¹Ð ÀÌØíÍé%AÉÍÌ°ÀÌØíQÁA½ÉФ)%ÉɽÈQ¡¸(%5Í ½à ÄØ°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½Ðí9½Ð½¹¹ÐѼÍÉÙÈÅÕ½Ðì¤(%á¥Ð)¹%($)]¡¥±Ä($ÀÌØíÍéÑô%¹ÁÕÑ ½à ÅÕ½ÐíM¹ÑѼÍÉÙÈÅÕ½Ðì°ÅÕ½Ðí¹ÑÈÑѼÑɹ͵¥ÐѼѡÍÉÙÈÅÕ½Ðì°ÅÕ½Ðí!±±¼É¥¹ÌÌìÅÕ½Ðì¤(%%ÉɽÈQ¡¸á¥Ñ1½½À($%Q
AM¹ ÀÌØí
½¹¹Ð°ÀÌØíÍéѤ($%%ÉɽÈQ¡¸á¥Ñ1½½À($$%M±À ÌÀ¤($%]¹
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...