[vlc-devel] vlc: svn commit r25020 (courmisch)

techfreak smile4you at gmx.ch
Sun Feb 10 13:45:37 CET 2008


Rémi Denis-Courmont schrieb:
>> After a short time, net_Read on the vnc socket (called in a seperate
>> thread) returns with -1 and writes the logmessage "socket xy polling
>> interrupted", but the socket is still open.
>>     
>
> So? Of course sockets are still open.
>   
The socket is still open but I tried to call net_Read again and it still 
returns ith -1 and logs "polling interrupted". If it is really open, 
then I should be able to continue reading on it, or not ?
>> The polling feature seems to not work correct here.
>>     
>
> It seems totally fine to me.
>
>   
Ok. If this is the normal behaviour, why is the polling interrupted when 
I set the parameter "waitall" of net_Read to true and the socket is 
still open?

>> What's the meaning of "polling" here?
>>     
>
> Calling poll().
>
>   
Good answer :-).
After finding a "Crash Course of UNIX TCP/IP Socket programming" in the 
net I understand the polling mechanism. This is new for me because my 
world is programming for windows. (If somebody is interested for a link 
to this crash course: 
http://www.fortunecity.com/skyscraper/arpanet/6/cc.htm , see description 
of select() function)
>> Should it wait until data is available?
>>     
>
> Until data is available from the socket *OR* the waitpipe is readable.
>
>   
When becomes the waitpipe readable? I'm not understanding yet the what 
the waitpipe does.

>> "recv" from winsock2 is already a blocking function returning not before
>> some data is available.
>>     
>
> How do you interrupt recv() asynchronously from another thread? It was my 
> understanding that this only works in POSIX (pthread_cancel()) and in Win16 
> (WSACancelBlockingCall or whatever) but is outright impossible in Win32.
>
>   
recv() is interrupted as soon as the socket is closed. You can activley 
close the socket from another thread. recv() returns then with -1.



My main question is: How can I read from the socket as long as the 
socket is open and my filter is not stopped.

I'm looking forward for a constructive answer.


Regards, Matthias

_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list