Logo Search packages:      
Sourcecode: sofia-sip version File versions

TPORT_DLL int tport_tqueue ( tport_t *  self,
msg_t msg,
tag_type_t  tag,
tag_value_t  value,

Queue a message to transport.

Queue a message to transport.

The tport_tqueue() function queues a message in the send queue. It is used by an (server) application that is required to send (response) messages in certain order. For example, a HTTP server or proxy may receive multiple requests from a single TCP connection. The server is required to answer to the requests in same order as they are received. The responses are, however, sometimes generated asynchronously, that is, a response to a later request may be ready earlier. For that purpose, the HTTP protocol stack queues an empty response message immediately upon receiving a request. Other messages cannot be sent before the queued one.

The function tport_tqsend() is used to send the completed response message.

self pointer to transport object
msg message to be inserted into queue
tag,value,... tagged argument list
Currently none.
Return values:
0 when successful
-1 upon an error
EINVAL Invalid argument(s). ENOMEM Memory was exhausted. ENOBUFS The transport object queue was full.

Alternative interface will be provided in near future.
See also:

Definition at line 3477 of file tport.c.

References tport_tqueue().

Referenced by server_request(), and tport_tqueue().


  return tport_queue(self, msg);

Generated by  Doxygen 1.6.0   Back to index