# Server program from socket import * # Set the socket parameters host = "localhost" port = 21567 buf = 1024 addr = (host,port) # Create socket and bind to address UDPSock = socket(AF_INET,SOCK_DGRAM) UDPSock.bind(addr) # Receive messages while 1: data,addr = UDPSock.recvfrom(buf) if not data: print "Client has exited!" break else: print "nReceived message '", data,"'" # Close socket UDPSock.close()
# Client program
from socket import *
# Set the socket parameters
host = "localhost"
port = 21567
buf = 1024
addr = (host,port)
# Create socket
UDPSock = socket(AF_INET,SOCK_DGRAM)
def_msg = "===Enter message to send to server===";
print "n",def_msg
# Send messages
while (1):
data = raw_input('>> ')
if not data:
break
else:
if(UDPSock.sendto(data,addr)):
print "Sending message '",data,"'....."
# Close socket
UDPSock.close()
Mitokine Bioscience was founded in Down East Maine in 2006 to develop a critical new treatment for diabetes. This year - 2009 - Mitokine’s treatment will be tested at Purdue University School of Veterinary Medicine in companion dogs that are insulin dependent, a natural diabetes model. A larger canine study to meet requirements for FDA approval for a veterinary pharmaceutical product will follow. In the mean time, research at Mitokine continues to develop a similar treatment for human diabetes.
* Google Mobile
* Google pdafriendly
* del.icio.us/mshook/
* del.icio.us/html/mshook/
* del.icio.us/popular/
* del.icio.us/url
* Wikipedia Search
- There is a pseudo-function called "print()" (not part of javaScript) that allows data to be placed in the output window. See examples for its use.