Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """Lets make a client socket!"""
- import socket
- sADDR = (<IP/socket of other computer>)
- buff = raw_input("Enter the buffer size:\n")
- cliSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- cliSock.connect(sADDR)
- while True:
- cliSock.send(raw_input(">> "))
- message = cliSock.recv(buff)
- if not message:
- break
- print message
- cliSock.close()
Advertisement
Add Comment
Please, Sign In to add comment