OWLNext
7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Using a Datagram Client
Create the socket (socket()):
TDatagramSocket socket(TINetSocketAddress());
socket.CreateSocket();
Bind the socket to a well-known name (bind()):
socket.SetPeerAddress(TINetSocketAddress(
htons
(2050),
INADDR_BROADCAST
));
VarType
Definition
safearray.h:14
To Write (sendto()):
socket.Write(
"Hello"
);
To Read (recvfrom()):
char
buffer
[80];
socket.Read(
buffer
,
sizeof
(
buffer
));
Close the connection (closesocket()):
socket.CloseSocket();
OWLNext
Overview of ObjectWindows
Overview of the Windows Socket Classes
Datagram Socket Communication
Generated by
1.10.0