Re: [reSIProcate] Problem in receiving message
- From: Ryan Kereliuk <ryker@xxxxxxxxx>
- Date: Wed, 13 Jun 2007 13:13:45 -0600
Make sure you've written a valid test program! Have a look in
resip/stack/test for lots of examples. For example, I don't see you
giving the stack any time slices so I wouldn't expect your code to work.
Thanks,
-Ryan
On 2007-06-13 at 09h07, Tuan Viet Nguyen wrote:
>
> SipStack stack;
> stack.addTransport(UDP, 8082);
>
> if (stack.isMyPort(8082))
> {
> // show "Port 8082";
> }else
> {
> // show "Not 8082";
> }
>
> while (true)
> {
> if (stack.hasMessage())
> {
> //Show "We have got a message!";
>
> SipMessage *msg = stack.receive();
>
> if (msg)
> {
> // Show msg->getSource().getPort();
> }
> }
> }
>
> When executing, my program listen on the port 8082 (verified with netstat), I
> used X-Lite to send some REGISTER to this port but the application does not
> receive anything. Here's the output:
>
> INFO | 20070613-180555.767 | | | RESIP:TRANSPORT | 0 | 3073754832 |
> UdpTransport.cxx:42 | Creating UDP transport host= port=8082 ipv4=1
> Port 8082
>
> Could you give me some advice?