Questions about extension with network
Posted: 03 May 2013 09:57
Hi,
I'm trying to create an extension that allows me to "chat" with other people (with the text showing up on the osd). In order to make sure that this works in a variety of environments my plan was to
1) get the extension to make a socket connection to a server
2) send messages out on the socket
3) on recieving a message from the socket, display it on the screen.
I have certain questions about this
1) I cannot poll in a loop on the socket to read messages because that seems to block indefinetly and vlc ultimately seems to believe the script is stuck
2) I do not see any specific timer event to check the socket periodically for new messages
3) I do not want to listen for incoming connections or listen on http because some people using this extension might be behind a firewall.
is there any other solution that appears viable?
thanks
I'm trying to create an extension that allows me to "chat" with other people (with the text showing up on the osd). In order to make sure that this works in a variety of environments my plan was to
1) get the extension to make a socket connection to a server
2) send messages out on the socket
3) on recieving a message from the socket, display it on the screen.
I have certain questions about this
1) I cannot poll in a loop on the socket to read messages because that seems to block indefinetly and vlc ultimately seems to believe the script is stuck
2) I do not see any specific timer event to check the socket periodically for new messages
3) I do not want to listen for incoming connections or listen on http because some people using this extension might be behind a firewall.
is there any other solution that appears viable?
thanks