SCTP Discussions

Text archives Help


[SCTP-Discussion] Using select() with SCTP fd


Chronological Thread 
  • From: "Oon Heok Kee" <oonheokkee78 AT hotmail.com>
  • To: discussion AT sctp.de
  • Subject: [SCTP-Discussion] Using select() with SCTP fd
  • Date: Wed Oct 23 06:02:01 2002
  • List-id: SCTP Discussions <discussion.sctp.de>

Hi,

We've got a piece of code which is actually part of a video-streaming client. Within this code, everytime it comes to the line "select(...)", it will always returns a "Bad file descriptor" error. So we tried commenting off that particular line. And the program started running! Is there some incompatibility of using the select() function call with SCTP?

We've also attached that portion of the code with some comments on the return values so that my question is clearer.

FD in line 5 is always 1023 (since it's the first socket created for the client) and i_ret is always returned as -1, with a "bad file descriptor error". Once the select() function and if-statement is commented off, things start working.

Thank you!!




Oon, Heok Kee

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
1 struct timeval timeout;
2 fd_set fds;
3 int i_ret;

4 FD_ZERO(&fds);
5 FD_SET(FD, &fds);

6 timeout.tv_sec = 0;
7 timeout.tv_usec = 1000000;

8 i_ret = select(FD + 1, &fds, NULL, NULL, &timeout);

9 if( i_ret == -1 && errno != EINTR )
10 {
11 intf_ErrMsg( "input error: network select error (%s)", strerror(errno) 12 );
13 }

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

_________________________________________________________________
Unlimited Internet access for only $21.95/month.  Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp





Archive powered by MHonArc 2.6.19+.

Top of page