You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New functionality to receive data from socket (#4)
* Added Try/Except block around header delimiter
Headers should end with a carriage return/line feed at the end of each line and then a blank line (with a CRLF) to end the header. In some cases, for example a 406 reponse, the header will not have the blank line and instead the server will close the connection. In this case the code raises a ValueError exception which is not very helpfully. Inserting this try/except block adds clarity to what failed.
* Removed .pyc file, added .gitignore
* GET_PARAM now callsback
Best I can tell, GET_PARAMETER is skipped being sent to callback because it is part of the heartbeat, and will get called every so often (current default 10s). I suppose I understand the intent, but not sure its the right approach, with the callback parameter, I want to see all traffic between server and client.
Also if CSeq isn't in response, teardown() and raise error.
* Break recv_msg into two functions
_recv_msg will continously poll for incoming data, _parse_msg will try to pull out any data that requires action.
* Turn off blocking on the socket
* _parse_msg now waits for full message
before sending it out to be processed.
0 commit comments