Advertisement
Hyratel

Untitled

Jan 4th, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. from __future__ import print_function
  4. import threading
  5. import time
  6. import socket
  7. UDP_IP = "127.0.0.1"
  8. UDP_PORT = 5005
  9. KEEPAMSG = "Otherdata 12"
  10.  
  11. sock = socket.socket(socket.AF_INET, # Internet
  12.                     socket.SOCK_DGRAM) # UDP
  13.  
  14. class Keepalive(threading.Thread):
  15.     def run(self):
  16.         sock.sendto(KEEPAMSG, (UDP_IP, UDP_PORT))
  17.  
  18.  
  19. class JoystickPoll(threading.Thread):
  20.     def run(self):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement