hi,
ich hab folgendes problem:
wenn ich den server wie im spoiler starte,dann funzt er nicht ich hab keine ahnung warum weiß das vllt einer von euch? ich hba zwar ne lösung gefunden aber dann kann nur ein client connecten und das ist ja auch doof weil ich mindestens 2 brauche.
Server:
Spoiler anzeigen
Global $Clients = 0
[/autoit] [autoit][/autoit] [autoit]TCPStartup()
[/autoit] [autoit][/autoit] [autoit]$MainSocket = TCPListen(@IPAddress1,6667)
If $MainSocket = -1 Then Exit
While 1
$Connect = TCPAccept($MainSocket)
If $Connect >= 0 Then
$Clients = $Clients + 1
EndIf
$Recv = TCPRecv($Connect,2048)
If $Recv <> "" Then
$split = StringSplit($Recv,"|")
If $split[1] = "MSG" Then
MsgBox(0,"", $split[2])
EndIf
EndIf
WEnd
Client:
Spoiler anzeigen
#include <inet.au3>
[/autoit] [autoit][/autoit] [autoit]TCPStartup()
[/autoit] [autoit][/autoit] [autoit]While 1
$Connect = TCPConnect(_GetIP(),6667)
If $Connect <> 0 Then ExitLoop
WEnd
TCPSend($Connect,"MSG|" & InputBox("la","bla"))
[/autoit]