Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails
return getattr(self._sock,name)(*args) socket.error: [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
from socket import * import thread, ssl def handler(clientsocket, clientaddr): print "Accepted connection from: ", clientaddr while 1: data = clientsocket.recv(1024) i = 0 while (i <= 0): if data == "DesktopClient1": print data i = 1 + 1 print 1 print "Desktop Verified" clientsocket.send("Mobile Verified") elif data == "MobileClient2": print data i = 1 + 1 print i print "Mobile Verified" clientsocket.send("Mobile Verified") else: break if not data: break else: print data msg = "You sent me: %s" % data clientsocket.send(msg) clientsocket.close() if __name__ == "__main__": host = 'localhost' port = 55567 buf = 1024 addr = (host, port) serversocket = socket(AF_INET, SOCK_STREAM) serversocket.bind(addr) serversocket.listen(2) while 1: print "Server is listening for connections\n" clientsocket, clientaddr = serversocket.accept() thread.start_new_thread(handler, (clientsocket, clientaddr)) serversocket.close()
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
10 Experts available now in Live!