Skip to content

Instantly share code, notes, and snippets.

@djfroofy
Created August 7, 2010 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djfroofy/512865 to your computer and use it in GitHub Desktop.
Save djfroofy/512865 to your computer and use it in GitHub Desktop.
def switchProtocol(currProto, newProto):
currentData = currProto.recvd
currProto.recvd = ''
newProto.makeConnection(currProto.transport)
if currentData:
newProto.dataReceived(currentData)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment