14 lines
316 B
Text
14 lines
316 B
Text
|
|
import system'net;
|
||
|
|
import system'text;
|
||
|
|
import extensions'text;
|
||
|
|
import system'io;
|
||
|
|
|
||
|
|
public program()
|
||
|
|
{
|
||
|
|
var socket := new Socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
|
||
|
|
socket.connect("127.0.0.1",256);
|
||
|
|
var s := "hello socket world";
|
||
|
|
socket.write(AnsiEncoder.toByteArray(0, s.Length, s));
|
||
|
|
socket.close()
|
||
|
|
}
|