342
Platforms
©2000-2008 Tibbo Technology Inc.
connections from this socket.
On_sock_data_arrival Event
Function:
Generated when at least one data byte is present in the
RX buffer of the socket (i.e. for this socket the
>0).
Declaration:
on_sock_data_arrival
See Also:
Details
When the event handler for this event is entered the
property is
automatically switched to the socket for which this event was generated. Another
event on a particular socket is never generated until the
previous one is processed.
method to extract the data from the RX buffer.
For TCP protocol (
= 1- PL_SOCK_PROTOCOL_TCP), there is no
separation into individual packets and you get all arriving data as a "stream". You
don't have to process all data in the RX buffer at once. If you exit the
on_sock_data_arrival event handler while there is still some unprocessed data in
the RX buffer another on_sock_data_arrival event will be generated immediately.
For UDP protocol (sock.protocol= 0- PL_SOCK_PROTOCOL_UDP), the RX buffer
preserves datagram boundaries. Each time you enter the on_sock_data_arrival
event handler you get to process next UDP datagram. If you do not process entire
datagram contents the unread portion of the datagram is discarded once you exit
the event handler.
This event is not generated for a particular socket when buffer redirection is set for
this socket through the
method.
On_sock_data_sent Event
Function:
Generated after the total amount of committed data in the
TX buffer of the socket (sock.txlen) is found to be less
than the threshold that was preset through the
method.
Declaration:
on_sock_data_sent
See Also:
---
Details
To cause generation of the on_sock_data_sent event, the application needs to use
sock.notifysent each time. When the event handler is entered the
is
automatically switched to the socket on which this event was generated.
352
339
340
342
333
345
346
340
340