-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclientt.py
More file actions
35 lines (26 loc) · 710 Bytes
/
clientt.py
File metadata and controls
35 lines (26 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'''
Created on Jul 26, 2011
@author: prates
'''
import socket
import streamStruct
class client(object):
sock = None
streamID=1
def __init__(self, server, port):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.connect((server, port))
def run(self):
self.send()
print 'teste'
def send(self):
pack = streamStruct.Pack(1)
name = streamStruct.NameValue()
name.addValue('host', 'localhost')
data = name.make()
data = pack.synStream(0, self.streamID, 0, 3, data)
self.sock.send(data)
def receive(self):
pass
b=client('',8001)
b.send()