OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Loading...
Searching...
No Matches
Using a Stream Server
Create a stream socket:
TStreamSocket socket(TINetSocketAddress(htons(2000), INADDR_ANY);
socket.CreateSocket();
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.18.0