Send data to a datagram socket


      HB_INETDGRAMSEND( <socket>, <cAddress>, <nPort>, <cBuffer>;
                         [, <nSize> ] ) -> nBytesSent


<socket> a socket previously created / opened






Returns number of bytes sent, or -1 on error


Sends a datagram (a fixed length data) to a determined ip address (cAddress, to be specified in quad-dot notation) and port.

If nSize is not specified, all the data in cBuffer will be sent; if nSize is specified, only the first nSize bytes of cBuffer will be sent.

There isn’t any guarantee that all the data required to be written is really sent to the socket: the calling program should check for the numeric return and send iteratively the unsent data to complete the message.

Anyway, the raw datagram is sent and received as once, and any data less than the system datagram size will be sent and received as a single item.

If the socket is created in broadcast mode, the cAddress element can be a broadcast address.

Returns -1 on error, or the number of bytes actually sent on success.



3 responses to “hb_inetDGramSend()

  1. Pingback: Harbour All Functions – H | Viva Clipper !

  2. Pingback: Harbour inet Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.