OWLNext
7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Using a Stream Server
Create a stream socket:
TStreamSocket socket(TINetSocketAddress(
htons
(2000),
INADDR_ANY
);
socket.CreateSocket();
VarType
Definition
safearray.h:14
Bind the socket to a well-known name (bind()):
socket.BindSocket();
Listen for connections (listen()):
socket.Listen();
Accept a connection (accept()):
TStreamSocket
client
;
socket.Accept(
client
);
To write (send()):
socket.Write(
"Hello"
);
To read (recv()):
char
buffer
[80];
socket.Read(
buffer
,
sizeof
(
buffer
));
Close the socket (closesocket())
socket.CloseSocket();
OWLNext
Overview of ObjectWindows
Overview of the Windows Socket Classes
Stream Socket Communication
Generated by
1.10.0