Skip to content

Instantly share code, notes, and snippets.

@Drvanon
Created June 11, 2012 13:29
Show Gist options
  • Save Drvanon/2910100 to your computer and use it in GitHub Desktop.
Save Drvanon/2910100 to your computer and use it in GitHub Desktop.
def send(self, data, to):
# Check for too long data
if len(data) > 5:
print 'Sending: l{}'.format(len(data))
self.listener.sendto('l' + str(len(data)), to)
# Send the actual data
print 'Sending: {}'.format(data)
self.listener.sendto(str(data), to)
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment