Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Sockets/Cind/sockets.cind
Normal file
12
Task/Sockets/Cind/sockets.cind
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
var libsocket = @("lib","socket");
|
||||
// connect
|
||||
int socket = libsocket.connect("localhost",256);
|
||||
// send data
|
||||
{
|
||||
sheet data = (sheet)"hello socket world";
|
||||
int datalen = data.size();
|
||||
int was = libsocket.send(socket,data,0,datalen);
|
||||
// assuming here that all data has been sent (if not, send them in some loop)
|
||||
}
|
||||
// close socket
|
||||
libsocket.close(socket);
|
||||
Loading…
Add table
Add a link
Reference in a new issue