You Are Here:

Community: Developer Discussion Boards

#1 Old Problem with select module - 2005-09-19, 21:48

Join Date: Sep 2005
Posts: 5
gekac++
Offline
Registered User
I have a problem. I have 2 sockets and select module with function select().
in C++ code look like this:
Code:
while (1)
 {
  ulout[0] = 1;
  ulout[1] = socket_out; # input socket handler
  ulin[0] = 1;
  ulin[1] = socket_in;# output socket handler
  
  l = select (0, (fd_set *)&ulout, NULL, NULL, &time);
  if(l == 1)
  {  	
   l = recv (sout, buf, sizeof (buf), 0);
   if (l <= 0)
   {
    return(0);
   }
  l = send(sin, buf, l, 0);
   if (l <= 0)
   {
    return(0);
   }
  }
  l = select (0, (fd_set *)&ulin, NULL, NULL, &time);
  if(l == 1)
  {
   l = recv (sin, buf, sizeof (buf),0);
   if (l <= 0)
   {
    return(0);
  }
   
   l = send(sout, buf, l, 0);
   if (l <= 0)
   {
    return(0);
   }
  }
 }
How this looks in Python?
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
problem when stop playing video on 3650 and try to play again niko86 Mobile Java General 5 2007-08-03 08:40
About 6230 Bt Problem eerkek Bluetooth Technology 17 2005-02-08 13:33
CodeWarrior EPOCROOT problem splinecl Symbian Tools & SDKs 1 2004-10-01 10:47
wireless problem sash_mca General Browsing 0 2003-06-06 12:34
Problem with NMSS SDK applet hidali General Messaging 2 2003-06-05 12:24

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia