SCTP Discussions

Text archives Help


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


Chronological Thread 
  • From: Tuexen Michael <michael.tuexen AT siemens.com>
  • To: "'Oon Heok Kee'" <oonheokkee78 AT hotmail.com>, discussion AT sctp.de
  • Subject: RE: [SCTP-Discussion] Using select() with SCTP fd
  • Date: Thu Oct 31 12:07:00 2002
  • List-id: SCTP Discussions <discussion.sctp.de>

Hi
Are you using select or ext_select? What is the way
FD is calculated?

Best regards
Michael

Michael Tuexen Tel.: +49 89 722 47210
Siemens AG Fax: +49 89 722 48212
ICN WN CC SE 7 e-mail:
Michael.Tuexen AT siemens.com

> -----Original Message-----
> From: Oon Heok Kee
> [mailto:oonheokkee78 AT hotmail.com]
> Sent: Wednesday, October 23, 2002 6:00 AM
> To:
> discussion AT sctp.de
> Subject: [SCTP-Discussion] Using select() with SCTP fd
>
>
> 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
>
> _______________________________________________
> discussion mailing list
> discussion AT sctp.de
> http://www.sctp.de/mailman/listinfo/discussion
>




Archive powered by MHonArc 2.6.19+.

Top of page