Skip to content

Commit 0c09b50

Browse files
committed
client code
Signed-off-by: Dhananjay1991 <[email protected]>
1 parent 73cc33b commit 0c09b50

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

client1.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import socket
2+
3+
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #line 2: create a socket object
4+
host = "192.168.0.7"
5+
port = 2001
6+
7+
s.connect((host, port))
8+
# s.send("Hello server...")
9+
print s.recv(100)
10+
s.send("hello world !")
11+
# message = raw_input("->")
12+
# while message != 'q':
13+
# s.send(message)
14+
# data = s.recv(1000)
15+
# print "received from server :" + data
16+
#
17+
# message = raw_input("->")
18+
19+
s.close()

0 commit comments

Comments
 (0)