Re: Socket question

2009-12-05 Thread Tim Roberts
perlsyntax wrote: > >I just want to know could it be done makeing my own socket tool that >connect to two server at the same time.And what link do i need to look at? You can certainly connect to two (or any number) servers at the same time, but you have to create two sockets to do it. -- Tim Ro

Re: Socket question

2009-12-03 Thread Lie Ryan
On 12/4/2009 1:52 AM, perlsyntax wrote: Is there away in python i can connect to a server in socket to two servers at the same time or can't it be done? use threading or non-blocking read. -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket question

2009-12-03 Thread cassiope
On Dec 3, 7:45 am, perlsyntax wrote: > On 12/03/2009 09:28 AM, exar...@twistedmatrix.com wrote:> On 02:52 pm, > fasteliteprogram...@gmail.com wrote: > >> Is there away in python i can connect to a server in socket to two > >> servers at the same time or can't it be done? > > > I'm not sure what y

Re: Socket question

2009-12-03 Thread D'Arcy J.M. Cain
On Thu, 03 Dec 2009 09:45:19 -0600 perlsyntax wrote: > On 12/03/2009 09:28 AM, exar...@twistedmatrix.com wrote: > > On 02:52 pm, fasteliteprogram...@gmail.com wrote: > >> Is there away in python i can connect to a server in socket to two > >> servers at the same time or can't it be done? > > > >

Re: Socket question

2009-12-03 Thread Grant Edwards
On 2009-12-03, perlsyntax wrote: > On 12/03/2009 09:28 AM, exar...@twistedmatrix.com wrote: >> On 02:52 pm, fasteliteprogram...@gmail.com wrote: >> >>> Is there away in python i can connect to a server in socket to >>> two servers at the same time or can't it be done? >> >> I'm not sure what you'r

Re: Socket question

2009-12-03 Thread perlsyntax
On 12/03/2009 09:28 AM, exar...@twistedmatrix.com wrote: On 02:52 pm, fasteliteprogram...@gmail.com wrote: Is there away in python i can connect to a server in socket to two servers at the same time or can't it be done? I'm not sure what you're asking. Can you clarify? Jean-Paul I just want

Re: Socket question

2009-12-03 Thread exarkun
On 02:52 pm, fasteliteprogram...@gmail.com wrote: Is there away in python i can connect to a server in socket to two servers at the same time or can't it be done? I'm not sure what you're asking. Can you clarify? Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket Question

2008-10-01 Thread Mark Tolonen
"Ali Hamad" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello All : A socket question from a networking newbie. I need to create a server that: 1) receive a message from client. 2) check that message and response to it. 3) the client get the server message and send another me

Re: Socket Question

2008-10-01 Thread [EMAIL PROTECTED]
Maybe you need to close the socket somewhere else, rather than to close it when you receive the your response. On 9月30日, 上午7时01分, Ali Hamad <[EMAIL PROTECTED]> wrote: > Hello All : > > A socket question from a networking newbie. I need to create > a server that: > > 1) receive a message from clien

Re: Socket Question

2008-10-01 Thread Leon Zhang
Maybe you need to close the socket somewhere else, rather than to close it when you receive the your response. On Tue, Sep 30, 2008 at 7:01 AM, Ali Hamad <[EMAIL PROTECTED]> wrote: > Hello All : > > A socket question from a networking newbie. I need to create > a server that: > > 1) receive a me

Re: socket question

2006-09-13 Thread hg
Diez B. Roggisch wrote: > hg wrote: > >> Hi, >> >> I am not sure whether this is a python-related question. >> >> If I have device A than sends XX bytes to device B, and device B does a >> recv(XX) using the default timeout, what could make device B wake-up >> with less than XX bytes received ? >

Re: socket question

2006-09-13 Thread hg
Jean-Paul Calderone wrote: > On Wed, 13 Sep 2006 08:13:43 -0500, hg <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I am not sure whether this is a python-related question. >> >> If I have device A than sends XX bytes to device B, and device B does a >> recv(XX) using the default timeout, what could make d

Re: socket question

2006-09-13 Thread Jean-Paul Calderone
On Wed, 13 Sep 2006 08:13:43 -0500, hg <[EMAIL PROTECTED]> wrote: >Hi, > >I am not sure whether this is a python-related question. > >If I have device A than sends XX bytes to device B, and device B does a >recv(XX) using the default timeout, what could make device B wake-up >with less than XX byte

Re: socket question

2006-09-13 Thread Diez B. Roggisch
hg wrote: > Hi, > > I am not sure whether this is a python-related question. > > If I have device A than sends XX bytes to device B, and device B does a > recv(XX) using the default timeout, what could make device B wake-up > with less than XX bytes received ? There exist higher abstractions fo

Re: socket question

2005-02-07 Thread Philippe C. Martin
Thanks, it was a bind problem: socket.gethostname() returns 'localhost' where '' is was was needed. Regards, Philippe On Mon, 07 Feb 2005 11:02:13 -0800, Kartic wrote: > > Philippe C. Martin wrote: >> >> My problem is that I cannot connect to my server if the client is > not on >> >> the sam

Re: socket question

2005-02-07 Thread Philippe C. Martin
Yes it was. Regards, Philippe On Mon, 07 Feb 2005 21:30:28 +, Steve Horsley wrote: > Philippe C. Martin wrote: >> Thanks you! that did it. >> > > That makes me wonder what socket.gethostname() was returning. > It wasn't 'localhost', was it? > > Steve -- http://mail.python.org/mailman

Re: socket question

2005-02-07 Thread Steve Horsley
Philippe C. Martin wrote: Thanks you! that did it. That makes me wonder what socket.gethostname() was returning. It wasn't 'localhost', was it? Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: socket question

2005-02-07 Thread Kartic
Philippe C. Martin wrote: > >> My problem is that I cannot connect to my server if the client is not on > >> the same PC (although I'm doing the above). Does the machine running the server code also have a firewall installed that blocks access to the server port from outside? That is the only po

Re: socket question

2005-02-07 Thread Philippe C. Martin
Thanks you! that did it. PS: the 'wrong' info I got seems to be in the official howtos http://www.amk.ca/python/howto/sockets/ Regards, Philippe On Mon, 07 Feb 2005 18:23:28 +0100, Diez B. Roggisch wrote: >> A couple things to notice: we used socket.gethostname() so that the >> socket woul

Re: socket question

2005-02-07 Thread Diez B. Roggisch
> A couple things to notice: we used socket.gethostname() so that the > socket would be visible to the outside world. If we had used s.bind(('', > 80)) or s.bind(('localhost', 80)) or s.bind(('127.0.0.1', 80)) we would > still have a "server" socket, but one that was only visible within the > same