krishna chaitanya <[EMAIL PROTECTED]> wrote:
> there a better way of doing the same? Does TIPC support non-blocking
> sockets?
1.7.3:
[..]
recv(5, 0x8055038, 65536, 0) = -1 EAGAIN
(where 5 is a tipc SOCK_STREAM socket)
> void wait_for_server(struct tipc_name* name,int wait)
[..]
> int sd = socket (AF_TIPC, SOCK_SEQPACKET,0);
[..]
> /* Now wait for the subscription to fire: */
> if (recv(sd,&event,sizeof(event),0) != sizeof(event)){
> perror("Failed to receive event");
> exit(1);
> }
I did not see any fcntl() O_NONBLOCK calls, so this blocks.
> int main(int argc, char* argv[], char* dummy[])
[..]
> if (XSetNonblockSocket (sd) != 0)
[..]
> if (0 > send(sd,buf,strlen(buf)+1,0)){
> perror("Client: Failed to send");
> }
This must not block.
If it does, please tell us what TIPC version you are using.
Florian
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion