xHarbour Reference Documentation > Function Reference |
Creates a bound datagram oriented socket.
INetDGramBind( <nPort> , ; [<cIPAddress>], ; [<lBroadcast>], ; [<cMulticast>] ) --> pSocket
The functions returns a pointer to a bound datagram socket.
Function INetDGramBind() creates a bound socket configured for the User Datagram Protocol (UDP). The socket is able to send and receive data.
If <lBroadcast> is set to .T. (true) a broadcast capable socket is returned. However, this may require certain user privileges.
A broadcast socket can be restricted to a group by specifiying a multicast IP address.
If the socket cannot be created, a socket error is set that can be analyzed with function INetErrorCode().
Note: refer to function INetDGramSend() for an example of datagram exchange between two processes.
See also: | INetDGram(), INetDGramRecv(), INetDGramSend() |
Category: | Datagram functions , Sockets functions , xHarbour extensions |
Source: | vm\INet.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com