Re: [RTnet-users] flush socket in RTNET

2010-05-07 Thread Jan Kiszka
kity hong wrote: > Hi,Jan > > In the source codes of ut_sock_init (void) :you can see this sequence : > 1--> struct rtnet_callback callback = {cb_recv, NULL}; > >/* create rt-socket */ > 2--> sock = socket_rt(AF_INET, SOCK_DGRAM, 0); > >/* extend the socket pool */ > 3--> ret =

Re: [RTnet-users] flush socket in RTNET

2010-05-07 Thread kity hong
Hi,Jan In the source codes of ut_sock_init (void) :you can see this sequence : 1--> struct rtnet_callback callback = {cb_recv, NULL}; /* create rt-socket */ 2--> sock = socket_rt(AF_INET, SOCK_DGRAM, 0); /* extend the socket pool */ 3--> ret = ioctl_rt(sock, RTNET_RTIOC_EXTPOOL, &

Re: [RTnet-users] flush socket in RTNET

2010-05-07 Thread Jan Kiszka
Please keep the list in CC. kity hong wrote: > Hi,Jan > > In the source codes of my implemetation, I did register the reception > callback after binding to the respective port. And that is the wrong order as packets can be queued once the socket is bound to a port (same is also true for other pr

Re: [RTnet-users] flush socket in RTNET

2010-05-07 Thread Jan Kiszka
kity hong wrote: > Hi, Jan > > We are using RTNET 0.7.0. > And we have a problem: the master is sending request while the slave > reboot. So there is a chance before the slave finished initializing > socket, the RTNET stack already received the packet , which make the > slave delay to receive the