[mythtv] MythSocket class
Jim Westfall
jwestfall at surrealistic.net
Wed Apr 5 01:08:48 UTC 2006
Hi
I took a stab at making a MythSocket class that was talked about briefly
last week. Attached is what I have thus far.
mythsocket.diff - main patch that adds MythSocket into libmyth without
converting anything else. Its based on QSocketDevice and adds readyRead,
connectionClosed, connected, and connectionFailed callbacks. It also has
a connectToHost() function like QSocket to background the connect()
process. I still need to add dns lookup support.
mythsocket_backend.diff - a quick and a little dirty conversion of the
backend to use MythSocket. I did have to slightly modified how the
backend handles incoming requests. Normally when readyRead is called the
socket is passed off to a worker thread and returns without reading from
it. This leaves the socket still in a readable state after the callback
which causes QSocketNotifier/MythSocket to trigger another readyRead. I
adjusted it so the backend fully processes the request before exiting the
callblack.
appreciate any comments.
jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythsocket.diff.gz
Type: application/octet-stream
Size: 2880 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060404/60b23df7/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythsocket_backend.diff.gz
Type: application/octet-stream
Size: 6540 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060404/60b23df7/attachment-0001.obj
More information about the mythtv-dev
mailing list