#!/usr/bin/env python
import socket
import sys
HOST,PORT="192.168.2.110",99
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect((HOST,PORT))
while True:
data =raw_input('msg to send::').strip()
if len(data) ==0:continue
sock.sendall(data+"\n")
received =sock.recv(1024)
print"Sent:{}",format(data)
print"Received:{}",format(received)
sock.close()
~