Re: tcp networking question (CLOSE_WAIT)

2016-02-25 Thread Ray
On Thursday, February 25, 2016 at 1:56:21 PM UTC-5, Martin A. Brown wrote: > Hello again Ray, > > >> >I'm new to python networking. I am waiting TCP server/client app by > >> >using python built-in SocketServer. My problem is if client get > >> >killed, then the tcp port will never get released,

Re: tcp networking question (CLOSE_WAIT)

2016-02-25 Thread Martin A. Brown
Hello again Ray, >> >I'm new to python networking. I am waiting TCP server/client app by >> >using python built-in SocketServer. My problem is if client get >> >killed, then the tcp port will never get released, in CLOSE_WAIT >> >> I did not thoroughly review your code (other than to see that

Re: tcp networking question (CLOSE_WAIT)

2016-02-25 Thread Ray
On Thursday, February 25, 2016 at 12:56:10 PM UTC-5, Ray wrote: > hi, > > I'm new to python networking. I am waiting TCP server/client app by using > python built-in SocketServer. My problem is if client get killed, then the > tcp port will never get released, in CLOSE_WAIT > > maybe I didn't d

Re: tcp networking question (CLOSE_WAIT)

2016-02-25 Thread Ray
On Thursday, February 25, 2016 at 1:18:05 PM UTC-5, Martin A. Brown wrote: > >I'm new to python networking. I am waiting TCP server/client app by > >using python built-in SocketServer. My problem is if client get > >killed, then the tcp port will never get released, in CLOSE_WAIT > > I did not t

Re: tcp networking question (CLOSE_WAIT)

2016-02-25 Thread Martin A. Brown
>I'm new to python networking. I am waiting TCP server/client app by >using python built-in SocketServer. My problem is if client get >killed, then the tcp port will never get released, in CLOSE_WAIT I did not thoroughly review your code (other than to see that you are not using SO_REUSEADDR).

Re: TCP sockets python timeout public IP adresss

2015-10-16 Thread sohcahtoa82
On Friday, October 16, 2015 at 2:44:53 AM UTC-7, lucasfneves14 wrote: > How did you do it? I took the advice of just being myself. -- https://mail.python.org/mailman/listinfo/python-list

Re: TCP sockets python timeout public IP adresss

2015-10-16 Thread Random832
lucasfneves14 writes: > How did you do it? That's an impressive reply gap. If anyone's wondering, this is apparently in reply to this from March: http://thread.gmane.org/gmane.comp.python.general/774441 -- https://mail.python.org/mailman/listinfo/python-list

Re: TCP sockets python timeout public IP adresss

2015-10-16 Thread Grant Edwards
On 2015-10-16, lucasfneves14 wrote: > How did you do it? I just climbed in and pushed the button. Same as always. -- Grant Edwards grant.b.edwardsYow! This MUST be a good at party -- My RIB CAGE is

Re: TCP sockets python timeout public IP adresss

2015-10-16 Thread Mark Lawrence
On 16/10/2015 10:44, lucasfneves14 wrote: How did you do it? I conned my way in, nobody suspected it. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: TCP sockets python timeout public IP adresss

2015-10-16 Thread lucasfneves14
How did you do it? -- https://mail.python.org/mailman/listinfo/python-list

Re: TCP sockets python timeout public IP adresss

2015-03-30 Thread bobbdeep
On Sunday, March 29, 2015 at 2:27:59 PM UTC+5:30, bobbdeep wrote: > I am trying to communicate between a server and client using TCP sockets. > > Server code: > > import socket > import sys > > # Create a TCP/IP socket > sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > # B

Re: TCP sockets python timeout public IP adresss

2015-03-29 Thread mm0fmf
On 29/03/2015 12:20, bobbdeep wrote: How do I add a port to the list of open ports on my server ? Ask the system administrator. -- https://mail.python.org/mailman/listinfo/python-list

Re: TCP sockets python timeout public IP adresss

2015-03-29 Thread bobbdeep
On Sunday, March 29, 2015 at 3:44:43 PM UTC+5:30, mm0fmf wrote: > On 29/03/2015 09:57, bobbydeep wrote: > > From the error (10060) it looks like Windows but it would be nice if > you could say which Python and OS you were using. > > I haven't looked at your code but just taking at face value th

Re: TCP sockets python timeout public IP adresss

2015-03-29 Thread mm0fmf
On 29/03/2015 09:57, bobbydeep wrote: From the error (10060) it looks like Windows but it would be nice if you could say which Python and OS you were using. I haven't looked at your code but just taking at face value that it does work internally. server_address = ('my-server-ipadress', 199

Re: TCP sockets python timeout public IP adresss

2015-03-29 Thread bobbdeep
Changed server code to the following, from socket import * HOST = '' PORT = 8080 serversocket = socket(AF_INET,SOCK_STREAM) serversocket.bind((HOST,PORT)) serversocket.listen(5) while True: (clientsocket, address) = serversocket.accept() print ("Got client request from",address) clien

Re: tcp server as windows service

2014-09-23 Thread Johannes Findeisen
Hi, On Tue, 23 Sep 2014 15:56:41 +0200 Arulnambi Nandagoban wrote: > Hello all, > > > > I developed a multithreaded tcp server with python and I converted into a > windows executable using pyinstaller. > > I would like to run the server as a windows service so that server restarts > whenev

Re: TCP reassembly

2013-04-25 Thread Dave Angel
On 04/25/2013 07:35 PM, Hasil Sharma wrote: Hi everyone , How to reassemble the TCP data packets into objects viz. html , css , js image files etc . I have no idea how to implement it using python , please help ? TCP reassembly has a specific meaning, and I doubt if that's what you mean. I

Re: TCP reassembly

2013-04-25 Thread Andrew Berg
On 2013.04.25 18:35, Hasil Sharma wrote: > Hi everyone , > How to reassemble the TCP data packets into objects viz. html , css , js > image files etc . I have no idea how to implement it using python , please > help ? TCP packets don't need to be reassembled. If your application receives TCP pa

Re: tcp socket problem

2008-07-26 Thread Dan Stromberg
On Fri, 25 Jul 2008 16:09:13 -0700, jm.carp wrote: > I'm writing a tcp client that grabs data from a server at 32hz. But the > connection drops exactly one minute after it's opened. I can get data > from the server fine for the first 60s, and then the connection goes > dead. What's going on? What

Re: tcp client socket bind problem

2008-03-12 Thread Dan Stromberg
On Sun, 09 Mar 2008 22:21:59 -0700, natambu wrote: > I have a linux box with multiple ip addresses. I want to make my python > client connect from one of the ip addresses. Here is my code, no matter > what valid information I put in the bind it always comes from the > default ip address on the ser

Re: tcp client socket bind problem

2008-03-12 Thread castironpi
On Mar 11, 2:19 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > >On Mar 10, 9:40 am, Marc Christiansen <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >> > I have a linux box with multiple ip addresses. I want to make my > >> > python client connect from one of

Re: tcp client socket bind problem

2008-03-11 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >On Mar 10, 9:40 am, Marc Christiansen <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > I have a linux box with multiple ip addresses. I want to make my >> > python client connect from one of the ip addresses. Here is my code, >> > no matter what valid informat

Re: tcp client socket bind problem

2008-03-10 Thread castironpi
On Mar 10, 9:40 am, Marc Christiansen <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I have a linux box with multiple ip addresses. I want to make my > > python client connect from one of the ip addresses. Here is my code, > > no matter what valid information I put in the bind it always

Re: tcp client socket bind problem

2008-03-10 Thread Marc Christiansen
[EMAIL PROTECTED] wrote: > I have a linux box with multiple ip addresses. I want to make my > python client connect from one of the ip addresses. Here is my code, > no matter what valid information I put in the bind it always comes > from the default ip address on the server. Am I doing something w

Re: tcp

2008-03-08 Thread Dan Stromberg
On Sun, 02 Mar 2008 23:05:27 -0500, Roy Smith wrote: > In article > <[EMAIL PROTECTED]>, > Gabriel Genellina <[EMAIL PROTECTED]> wrote: > >> On 2 mar, 17:21, [EMAIL PROTECTED] wrote: >> >> > This worked: >> > >> > import socket >> > from time import time >> > >> > for i in range( 20 ): >> >    

Re: tcp

2008-03-02 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 2 mar, 17:21, [EMAIL PROTECTED] wrote: > > > This worked: > > > > import socket > > from time import time > > > > for i in range( 20 ): > >     HOST = '' > >     PORT = 80 #< > >     s = socket.socket(socket.A

Re: tcp

2008-03-02 Thread Gabriel Genellina
On 2 mar, 17:21, [EMAIL PROTECTED] wrote: > This worked: > > import socket > from time import time > > for i in range( 20 ): >     HOST = '' >     PORT = 80 #< >     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >     s.bind((HOST, PORT)) >     print( 'listen' ) >     s.listen(1) >    

Re: tcp

2008-03-02 Thread Gif
thanks everybody, i've got this to work. i'm not trying to write an actual web server, i'm just using it for some procedures like URL rewriting. -- http://mail.python.org/mailman/listinfo/python-list

Re: tcp

2008-03-02 Thread castironpi
On Mar 2, 11:38 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Nobody thinks you are a fool for wanting help with your problems, it's > simply that you have to provide enough information about what' wring for > us to get a handle on the issues. This worked: import socket from time import time for

Re: tcp

2008-03-02 Thread Steve Holden
Gif wrote: > i would like to apologize once more. i understand that you are saying > "what a fool he is waiting for us to solve all his problems", cause > i've said that for other posts, when they seemed "immature". It's just > that i couldn't find a way out of 20 lines of code and this drove me >

Re: tcp

2008-03-02 Thread Diez B. Roggisch
Gif schrieb: > sorry for acting like a fool but this is just to weirdly easy that i > can't get to work. i've written a small web server in another language > and this is more like copying code. > i already have everything figured out, except this one but noone seems > either willing or capable of

Re: tcp

2008-03-02 Thread Grant Edwards
On 2008-03-02, Gif <[EMAIL PROTECTED]> wrote: > sorry for acting like a fool but this is just to weirdly easy > that i can't get to work. i've written a small web server in > another language and this is more like copying code. i already > have everything figured out, except this one but noone see

Re: tcp

2008-03-02 Thread Gif
i would like to apologize once more. i understand that you are saying "what a fool he is waiting for us to solve all his problems", cause i've said that for other posts, when they seemed "immature". It's just that i couldn't find a way out of 20 lines of code and this drove me mad. i end this topi

Re: tcp

2008-03-02 Thread Gif
sorry for acting like a fool but this is just to weirdly easy that i can't get to work. i've written a small web server in another language and this is more like copying code. i already have everything figured out, except this one but noone seems either willing or capable of helping me. again sorry

Re: tcp

2008-03-02 Thread Diez B. Roggisch
Gif schrieb: > you could at least check before posting. as i said i've tried like > 1000 ways of doing that, and im so desparate that i'm thinking of > quiting python. This damn thing just doesnt work. when i do as you > post the server never even replies, as it tends to accept connections > all th

Re: tcp

2008-03-02 Thread Gif
you could at least check before posting. as i said i've tried like 1000 ways of doing that, and im so desparate that i'm thinking of quiting python. This damn thing just doesnt work. when i do as you post the server never even replies, as it tends to accept connections all the time. anyone has a b

Re: tcp

2008-03-02 Thread Steve Holden
7stud wrote: > On Mar 2, 6:09 am, Gif <[EMAIL PROTECTED]> wrote: >> i have this small script which after some router configurations works. >> >> ## >> >> #! /usr/bin/python >> import socket >> >> HOST = '' >> PORT = 1515 >> s = socket.socket(s

Re: tcp

2008-03-02 Thread 7stud
On Mar 2, 6:09 am, Gif <[EMAIL PROTECTED]> wrote: > i have this small script which after some router configurations works. > > ## > > #! /usr/bin/python > import socket > > HOST = '' > PORT = 1515 > s = socket.socket(socket.AF_INET, socket.SOC

Re: tcp functions

2008-03-01 Thread Diez B. Roggisch
Gif schrieb: > is there a module for tcp functions or any other quick way to connect, > listen, send and recieve from tcp? > thanks in advance Reading the docs helps - hint: module "socket". Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: TCP reset caused by socket.py

2007-12-13 Thread Gabriel Genellina
En Wed, 12 Dec 2007 20:12:43 -0300, Object01 <[EMAIL PROTECTED]> escribi�: > I don't know much about the timing of Python's garbage collection. Is > it pretty aggressive? As soon as the reference count reaches zero (at least for current CPython version). Objects that are part of a reference cy

Re: TCP reset caused by socket.py

2007-12-12 Thread Bjoern Schliessmann
Object01 wrote: > Is there something I can look for in the packet traffic that would > indicate one party is misbehaving? The sequence numbers seem ok. > *shrug* I'd expect to see data sent from server to client and > then see a sequence of packets that close the connection > gracefully. Instead

Re: TCP reset caused by socket.py

2007-12-12 Thread Object01
> Is this applicable in your > case?:http://brad.livejournal.com/2152593.html?thread=10832273#t10832273 > (closing a nonblocking socket with a nonempty output queue generates a RST) Based on my stepping through the code, everything passed to _fileobject.write() makes it out onto the wire just fin

Re: TCP reset caused by socket.py

2007-12-12 Thread Gabriel Genellina
En Wed, 12 Dec 2007 13:38:21 -0300, Object01 <[EMAIL PROTECTED]> escribió: > On Dec 11, 6:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Tue, 11 Dec 2007 10:51:13 -0300, Object01 <[EMAIL PROTECTED]> >> escribi�: >> >> > I've been working with the source code for Trac (http:// >> >

Re: TCP reset caused by socket.py

2007-12-12 Thread Gabriel Genellina
En Wed, 12 Dec 2007 15:46:14 -0300, Bjoern Schliessmann <[EMAIL PROTECTED]> escribió: > Gabriel Genellina wrote: >> A RST when you close a socket is OK. > Says who? MS? ;) Nevermind... just nonsense! -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: TCP reset caused by socket.py

2007-12-12 Thread Jeff McNeil
Do you have any non-standard network hardware along the route? Perhaps a transparent proxy like a load balancer or a firewall of sorts? I've seen this type of thing happen before with load balancer gear. In my situation, I had a load balancer that kept a state table. If the load balancer didn't

Re: TCP reset caused by socket.py

2007-12-12 Thread Object01
On Dec 12, 12:45 pm, Bjoern Schliessmann wrote: > Object01 wrote: > > The server is multithreaded, handling each request on its own > > thread. > > Ugh. > > > But is a RST really a part of a valid close operation? > > Depends on the state of the parties :) The proper way to close > non-defunct con

Re: TCP reset caused by socket.py

2007-12-12 Thread Bjoern Schliessmann
Gabriel Genellina wrote: > A RST when you close a socket is OK. Says who? MS? ;) Regards, Björn -- BOFH excuse #328: Fiber optics caused gas main leak -- http://mail.python.org/mailman/listinfo/python-list

Re: TCP reset caused by socket.py

2007-12-12 Thread Bjoern Schliessmann
Object01 wrote: > The server is multithreaded, handling each request on its own > thread. Ugh. > But is a RST really a part of a valid close operation? Depends on the state of the parties :) The proper way to close non-defunct connections is using FIN segments. > It was my understanding that

Re: TCP reset caused by socket.py

2007-12-12 Thread Object01
On Dec 11, 6:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 11 Dec 2007 10:51:13 -0300, Object01 <[EMAIL PROTECTED]> escribi�: > > > I've been working with the source code for Trac (http:// > > trac.edgewall.org/) lately and have run across a bizarre problem. It > > seems that all

Re: TCP reset caused by socket.py

2007-12-11 Thread Gabriel Genellina
En Tue, 11 Dec 2007 10:51:13 -0300, Object01 <[EMAIL PROTECTED]> escribi�: > I've been working with the source code for Trac (http:// > trac.edgewall.org/) lately and have run across a bizarre problem. It > seems that all POST requests to Trac's standalone server (tracd) have > a random chance of

Re: tcp socket programming

2005-10-04 Thread Mohammed Smadi
On Tue, 4 Oct 2005, Irmen de Jong wrote: > Mohammed Smadi wrote: > > hi; > > If i have a tcp connection with a remote server, what is a good way to > > read all the data into a buffer before starting to process the data? > > I know that the data recieved will be 3 lines with CRLF between them.

Re: tcp socket programming

2005-10-04 Thread Irmen de Jong
Mohammed Smadi wrote: > hi; > If i have a tcp connection with a remote server, what is a good way to > read all the data into a buffer before starting to process the data? > I know that the data recieved will be 3 lines with CRLF between them. > However if I can sock.recv(1024) the output is not

Re: TCP server

2005-01-24 Thread Pedro Werneck
A quick example for you: ### import SocketServer class EchoRequestHandler(SocketServer.BaseRequestHandler): def setup(self): print self.client_address, 'connected!' self.request.send('hi ' + str(self.client_address) + '\n') def handle(self): while 1: