Doubt about sockets

Eric Norum wenorum at lbl.gov
Tue Jun 22 16:41:53 UTC 2010


On Jun 22, 2010, at 9:21 AM, Vinu Rajashekhar wrote:

> On Tue, Jun 22, 2010 at 9:48 PM, Eric Norum <wenorum at lbl.gov> wrote:
> You can read and write a socket from different threads.
> Just don't have multiple threads trying to read at the same time or trying to write at the same time.
> 
> 
> Yes, what if that happens, I don't care about the data being transferred.
> I just want to wakeup select using the socket, then ?

Are you doing a select waiting for read data to appear?
or are you doing a select waiting for space to become ready in a write queue?

Do you mean you do a write on one machine and want the 'select read' to wake up on the other machine?

It's not clear to me what you have in mind.

>  
> On Jun 22, 2010, at 9:03 AM, Vinu Rajashekhar wrote:
> 
> > From the networking documentation, it seems that one cannot
> > share the same socket across threads/tasks for the same operation, like
> > read or write.
> >
> > What is the exact problem if I use the same socket to write something
> > across different threads, is data corruption the only problem? More specifically,
> > if I have run a select call on a socket, and if I write something into the socket,
> > from different threads, does the select wakeup for sure ?
> > _______________________________________________
> > rtems-users mailing list
> > rtems-users at rtems.org
> > http://www.rtems.org/mailman/listinfo/rtems-users
> 
> --
> Eric Norum
> wenorum at lbl.gov
> 
> 

-- 
Eric Norum
wenorum at lbl.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20100622/05be9caf/attachment-0001.html>


More information about the users mailing list