2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -6,8 +6,10 @@ version(Win32) {
|
|||
pragma(lib, "ws2_32.lib") ;
|
||||
}
|
||||
void main() {
|
||||
long res;
|
||||
auto socket = new Socket(AddressFamily.INET, SocketType.STREAM) ;
|
||||
socket.connect(new InternetAddress("localhost",256)) ;
|
||||
writefln(socket.send(cast(void[])"hello socket world"), " bytes sent.") ;
|
||||
res = socket.send(cast(void[])"hello socket world") ;
|
||||
writefln("Socket %d bytes sent.", res) ;
|
||||
socket.close() ;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue