| Reply | « Previous Thread | Next Thread » |
|
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);
}
}
}
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| 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 |