< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] Help: How to do Subscription over TCP


Title: Message
Hi,
I'm using the DUM to perform a subscription over TCP and I can't get it to work.The request message is received but the response does not get sent. Can someone tell me if I'm doing something wrong?
 
I'm using a SUBCRIBE request. This is received successfully and the newSubscription callback is invoked. Inside my callback is an accept (ServerSubscriptionHandler::accept).  This creates a 200 OK response which is placed passed to the SipStack and makes it to the txFifo of the appropriate transport. Next, the ConnectionManager passes the response manager to the appropriate Connection.  Then, the Connection fails to send - it appears the socket is not set up for writing.
This happens over 3 process() calls with calls to buildFdSet() in between:
 
1 process():
    new TCP connection established
    new subscription callback invoked
    call accept, 200 ok response placed in message queue
 
buildFdSet() --> read-enable new TCP socket
 
2 process():
     get response from message queue and pass to transport txFifo
 
buildFdSet() --> read-enable new TCP socket (no write-enable done since there are no connections with a queue of messages to send)
 
3 process():
    processAllWriteRequests---> get the message and pass it to the connection object;
    connection object adds self to the Connection Manager write list
    processSomeWrites---> get the connection from the Connection Manager write list and
    perform the actual write...fails, socket not write-enabled.
 
Thanks
Liz

 

Elizabeth Clark                                
Bridgewater Systems Corporation               
Phone :  (613) 591-9104 x2776
E-mail :
mailto:elizabeth@xxxxxxxxxxxxxxxxxxxxxx