Quote: |
http://www.ultimatepp.org/srcdoc$Web$ConnectionOriented$en-u s.html |
Socket my_sock; int port=2000; String host = "192.168.1.2"; if( ClientSocket(my_sock, port, host) ); { my_sock.Write("hello world!"); my_sock.Close(); }
if( ClientSocket(my_sock, host, port) )
bool IO; String snd(String r, int a){ Socket s; if(!ClientSocket(s, "127.0.0.1", 5024)) { return "x"; } if(IO) s.Write(r + "\n\0"); if(a==1 && IO){ String st = s.ReadUntil('\n'); return st; } return "y"; } #endif