Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
imanay
- Wed, 09 Jan 2013 21:06:56
Show More
0
trunk/absroot/source/abspy/test/tcp/client.py
trunk/absroot/source/abspy/test/tcp/client.py
+2
-2
@@
-1,14
+1,14
1
1
import socket
2
2
3
host = "192.168.1.117"
3
host = "192.168.1.100 "
4
4
s = socket . socket ()
5
5
s . connect (( host , 5500 ))
6
6
7
fd = open ( "input.txt" , "r" )
7
fd = open ( "input3 .txt" , "r" )
8
8
FileList = fd . readlines ()
9
9
mensaje = "" . join ( FileList )
10
10
s . send ( mensaje )
11
11
12
12
print "adios"
13
13
14
14
s . close ()
No newline at end of file
0
trunk/absroot/source/abspy/test/tcp/file.py
trunk/absroot/source/abspy/test/tcp/file.py
+2
-2
@@
-1,8
+1,8
1
n = 16384 + 1
1
n = 511 + 1
2
2
#n = 32768 + 1
3
fd = open ( "input2.txt" , "w" )
3
fd = open ( "input3 .txt" , "w" )
4
4
for i in range ( n ):
5
5
fd . write ( "@" )
6
6
fd . write ( "quit" )
7
7
fd . close ()
8
8
print "terminado"
0
trunk/absroot/source/abspy/test/tcp/server.py
trunk/absroot/source/abspy/test/tcp/server.py
+15
-13
@@
-1,25
+1,27
1
1
import socket
2
2
import time
3
3
4
host = "192.168.1.117"
4
host = "192.168.1.100 "
5
5
s = socket . socket ()
6
6
s . bind (( host , 5500 ))
7
print "waiting client..."
8
s . listen ( 1 )
7
8
while True :
9
print "waiting client..."
10
s . listen ( 1 )
9
11
10
sc , addr = s . accept ()
11
all = ""
12
13
while True :
14
recibido = sc . recv ( 1024 )
15
all = all + recibido
16
if all [ - 4 :] == "quit" :
17
break
12
sc , addr = s . accept ()
18
13
19
print " \n Total:" , all
20
print " \n Longitud:" , len ( all )
14
all = ""
15
while True :
16
recibido = sc . recv ( 1024 )
17
all = all + recibido
18
if all [ - 4 :] == "quit" :
19
break
20
21
print " \n Total:" , all
22
print " \n Longitud:" , len ( all )
21
23
22
24
sc . close ()
23
25
s . close ()
24
26
25
27
#print len(recibido)
No newline at end of file
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages