SuperStrict Local Server_Host:String = "irc.blitzed.org" Local Server_IP:Int = HostIp(Server_Host) Local Server_Port:Int = 6667 If Server_IP = 0 Print "Could not resolve Servername!" End EndIf Local Server_Socket:TSocket = CreateTCPSocket() Local Server_Stream:TSocketStream = CreateSocketStream(Server_Socket, True) If ConnectSocket( Server_Socket, Server_IP, Server_Port) Print "Connected succesfully!" Local data:String data = "USER TestUser MaxIRC "+Server_Host+" :MaxTest" WriteLine(Server_Stream, data) data = "NICK TestUser" WriteLine(Server_Stream, data) While Not Eof(Server_Stream) data = ReadLine(Server_Stream) Print data Wend Else Print "STFU!" EndIf
Problem: It never gets out of the While...Wend
Is there any misinterpreting from my side, coz i looked into "socketstream.bmx" and there is written:
... Method Eof() If Not _socket Return True If _socket.Connected() Return False Close Return True End Method ...
then i tried to get the number of readable byte by:
Print SocketReadAvail(Server_Socket)
but it returns everytime 0 - even if there IS something to read
Any tips for me? :)
tia
robo