ulimit on open sockets ?

2007-04-09 Thread Maxim Veksler
Hi, I've written this code, the general idea was to listen on all 65535 port of tcp for connection. """ #!/usr/bin/env python import socket, select def get_non_blocking_socket(port_number): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setblocking(0) s.bind(('0.0.0.0', port

Re: Problem with sockets and python 2.5

2007-03-21 Thread Jose Alberto Reguero
El Lunes, 19 de Marzo de 2007, Jose Alberto Reguero escribió: > I had two programs, server.py and client.py(attached) > > 1: > server.py at i386 python 2.4 > client.py at x86_64 python 2.5 > Work > > 2: > server.py at x86_64 python 2.5 > client.py at i386 python 2.4 > Don't

Re: Problem with sockets and python 2.5

2007-03-20 Thread Fabio FZero
On Mar 20, 10:05 am, Facundo Batista <[EMAIL PROTECTED]> wrote: > Jose Alberto Reguero wrote: > > 2: > >server.py at x86_64 python 2.5 > >client.py at i386 python 2.4 > > Don't work > > What do you mean with "don't work"? > > They crash? Your machine hungs? Your house explodes? Traceback (

Re: Problem with sockets and python 2.5

2007-03-20 Thread Facundo Batista
Jose Alberto Reguero wrote: > 2: > server.py at x86_64 python 2.5 > client.py at i386 python 2.4 > Don't work What do you mean with "don't work"? They crash? Your machine hungs? Your house explodes? You'd be more specific in the error you get, and what behaviour you expect. Regards

Re: Problem with sockets and python 2.5

2007-03-19 Thread Steve Holden
Jose Alberto Reguero wrote: > I had two programs, server.py and client.py(attached) > > 1: > server.py at i386 python 2.4 > client.py at x86_64 python 2.5 > Work > > 2: > server.py at x86_64 python 2.5 > client.py at i386 python 2.4 > Don't work > > Any ideas? Fix them?

Problem with sockets and python 2.5

2007-03-19 Thread Jose Alberto Reguero
I had two programs, server.py and client.py(attached) 1: server.py at i386 python 2.4 client.py at x86_64 python 2.5 Work 2: server.py at x86_64 python 2.5 client.py at i386 python 2.4 Don't work Any ideas? Thanks. Jose Alberto clinet.py Description: applicatio

[OT]Could anyone send me a copy of "timeout sockets for jython"

2007-01-24 Thread Slowness Chen
The information about this module: http://www.xhaus.com/alan/python/timeout.html I can't access the download url due to the severe network issue these days, and I need to use this module for work. Could anyone do me a favor to send a copy? the download url : http://cvs.sourceforge.net/viewcvs.py/

The trouble with sockets.... (fixing inheritance, etc.)

2007-01-09 Thread rossabri
This topic has been addressed in limited detail in other threads: [1] "sockets don't play nice with new style classes :(" May 14 2005. http://groups.google.com/group/comp.lang.python/browse_thread/thread/76d27388b0d286fa/c9849013e37c995b [2] "Subclassing socket" Dec 20

Re: How to manage two (different) sockets without using threads?

2006-12-13 Thread Fredrik Lundh
billie wrote: > I'm succesfully managing command channel through asynchat framework, > but I'm not sure about how to manage data channel without using a > thread/subprocess. use a separate dispatcher instance for the data transfer. see the ftp_handle_pasv_response method and async_ftp_download c

Re: How to manage two (different) sockets without using threads?

2006-12-13 Thread Bjoern Schliessmann
billie wrote: > I'm (re)writing an FTP server application by using > asyncore/asynchat modules. > FTP tipically got two different channels: command and data. > I'm succesfully managing command channel through asynchat > framework, but I'm not sure about how to manage data channel > without using a

Re: How to manage two (different) sockets without using threads?

2006-12-13 Thread Jordan
Why are you trying to make this asynchronous? I think part of the point of ftp using two sockets was to make it multithreaded. If you're going to make it asynchronous, It's probably going to be easier to do the "select"ing yourself, instead of relying on asyncore or asynchat

Re: How to manage two (different) sockets without using threads?

2006-12-13 Thread Maksim Kasimov
Hi, i don't know how to do it with asyncore/asynchat, but it is possible to handle different sockets in one process by using "select" standard module: for_reading, for_writing, where_errors =\ select.select( ( ), ( ), (), 0) you can find all necessary inform

How to manage two (different) sockets without using threads?

2006-12-13 Thread billie
Hi all. I'm (re)writing an FTP server application by using asyncore/asynchat modules. FTP tipically got two different channels: command and data. I'm succesfully managing command channel through asynchat framework, but I'm not sure about how to manage data channel without using a thread/subprocess.

Re: Sockets in python

2006-10-03 Thread Christophe
led cord from ethernet card windows determined that network > lost and started to closing all sockets opened to that network (and so > EINVAL or other OS error raised when twisted tryed to read wrom that > socket), > while the server did had a network - and it was right thing that serv

Re: Sockets in python

2006-10-02 Thread OneMustFall
rk lost and started to closing all sockets opened to that network (and so EINVAL or other OS error raised when twisted tryed to read wrom that socket), while the server did had a network - and it was right thing that server was thinking that socket is alive. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sockets in python

2006-10-02 Thread Bryan Olson
OneMustFall wrote: > Reciently i wrote a simple client (in twisted) using Reconnecting > Factory. > That client logins to my socket server.. and that`s it. > > Interesting thing is that it is seems that twisted client, > sends some ping on a TCP level without sending any da

Sockets in python

2006-09-29 Thread OneMustFall
directly. Because when i pull out cord from the ethernet card simulating network falure, client in about 10-15 seconds determines that connection lost!! (pretty cool) While my server thinks that client is connected. I know that sockets ware designed to behave so.. to be

Re: Outbound port on sockets

2006-09-17 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > As I mentioned if the posting you made a partial quote from, the > original specification of port-mode FTP has the server making a data > connection from its port 20 to the client port identified by the > client's PORT command. This is TCP port 20? What

Re: Outbound port on sockets

2006-09-17 Thread Steve Holden
Bryan Olson wrote: > Steve Holden wrote: > >>Grant Edwards wrote: >> Well, one of ftpd implementations I have here (C code from RTEMS) does this: /* anchor socket to avoid multi-homing problems */ data_source = info->ctrl_addr; data_source.sin_port = htons(2

Re: Outbound port on sockets

2006-09-17 Thread Bryan Olson
Steve Holden wrote: > Grant Edwards wrote: >>> Well, one of ftpd implementations I have here (C code from RTEMS) does >>> this: >>> >>> /* anchor socket to avoid multi-homing problems */ >>> data_source = info->ctrl_addr; >>> data_source.sin_port = htons(20); /* ftp-data port */ >>>

Re: Outbound port on sockets

2006-09-17 Thread Bryan Olson
Grant Edwards wrote: > Diez B. Roggisch wrote: [Bryan Olson had written:] >>> It's not the issue here, but to specify the outgoing port >>> call bind(('', portnum)) before connect(). >> I wasn't aware of that. Cool. > > It's an interesting thing to know, but I've been doing TCP > stuff for many ye

Re: Outbound port on sockets

2006-09-17 Thread Jorgen Grahn
On Thu, 14 Sep 2006 18:21:39 +0200, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > bmearns wrote: ... > (and before you proceed, reading > > http://cr.yp.to/ftp/security.html > > is also a good idea. And RFC1123, and any number of FTP-related RFCs. There's even one fairly early RFC that encourag

Re: Outbound port on sockets

2006-09-15 Thread Grant Edwards
On 2006-09-15, Steve Holden <[EMAIL PROTECTED]> wrote: >> I don't know what "multi-homing problems are either". >> Apparently there must be some ftp clients that require the >> source port for the data connection to be port 20. >> >> The RFC is pretty vague. It does say the server and clinet but

Re: Outbound port on sockets

2006-09-15 Thread Steve Holden
Grant Edwards wrote: > On 2006-09-15, Sergei Organov <[EMAIL PROTECTED]> wrote: > > >It's not the issue here, but to specify the outgoing port >call bind(('', portnum)) before connect(). > > >>>It's an interesting thing to know, but I've been doing TCP >>>stuff for many years and never

Re: Outbound port on sockets

2006-09-15 Thread Grant Edwards
On 2006-09-15, Sergei Organov <[EMAIL PROTECTED]> wrote: It's not the issue here, but to specify the outgoing port call bind(('', portnum)) before connect(). >> It's an interesting thing to know, but I've been doing TCP >> stuff for many years and never run across a situation where >> i

Re: Outbound port on sockets

2006-09-15 Thread Sergei Organov
Grant Edwards <[EMAIL PROTECTED]> writes: > On 2006-09-15, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > > Is it possible to specify which port to use as the outbound port on a > connection? >>> [...] > Specifically, I'm trying to write an FTP host, and I'm trying to > implement t

Re: Outbound port on sockets

2006-09-15 Thread Grant Edwards
On 2006-09-15, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: Is it possible to specify which port to use as the outbound port on a connection? >> [...] Specifically, I'm trying to write an FTP host, and I'm trying to implement the PORT command. >>> >>> AFAIK you neither can't d

Re: Outbound port on sockets

2006-09-15 Thread Diez B. Roggisch
Bryan Olson schrieb: > Diez B. Roggisch wrote: >> bmearns schrieb: >>> Is it possible to specify which port to use as the outbound port on a >>> connection? > [...] >>> Specifically, I'm trying to write an FTP host, and I'm trying to >>> implement the PORT command. >> >> AFAIK you neither can't d

Re: Outbound port on sockets

2006-09-14 Thread Bryan Olson
Diez B. Roggisch wrote: > bmearns schrieb: >> Is it possible to specify which port to use as the outbound port on a >> connection? [...] >> Specifically, I'm trying to write an FTP host, and I'm trying to >> implement the PORT command. > > AFAIK you neither can't do that nor need it. It's not t

Re: Outbound port on sockets

2006-09-14 Thread Fredrik Lundh
bmearns wrote: > All the same, it's a good suggestion. Thank you. Now do you know how I > (as the server) can force clients to use PASV, instead of PORT? have you tried returning a suitable error code ? (502 should be a good choice). (and before you proceed, reading http://cr.yp.to/ftp/s

Re: Outbound port on sockets

2006-09-14 Thread bmearns
> But you can restrict the numbers of ports the server will use to a > certain range! It's common for ftp to allow only for so many connections > at the same time, so reserve a port-range of 20 or so for your server > and configure the router to forward them. Thanks, I think that'll have to be my

Re: Outbound port on sockets

2006-09-14 Thread Diez B. Roggisch
bmearns schrieb: > Passive mode is implemented, the client isn't trying to use it. > Besides, that doesn't really help me anyway, all it means is that I > have to resolve port forwarding for the server, instead of for the > client. > > I think what this basically comes down to is that either with

Re: Outbound port on sockets

2006-09-14 Thread Steve Holden
billie wrote: [...] > The right format of a FTP PORT command is: > > PORT x,x,x,x,y,z > > where x(s) represents your IP address in dotted form and (x * y) the > TCP port you bind. That's actually x*256 + y - tou're makling a 16-bit unsigned integer from two bytes. > For further informations

Re: Outbound port on sockets

2006-09-14 Thread bmearns
It's actually 256*y + z billie wrote: > > The right format of a FTP PORT command is: > > > > PORT x,x,x,x,y,z > > > > ...where x(s) represents your IP address in dotted form and (x * y) the > > TCP port you bind. > > Sorry, I wanted to say: (y * z) -- http://mail.python.org/mailman/listinfo/pyth

Re: Outbound port on sockets

2006-09-14 Thread bmearns
Passive mode is implemented, the client isn't trying to use it. Besides, that doesn't really help me anyway, all it means is that I have to resolve port forwarding for the server, instead of for the client. I think what this basically comes down to is that either with PASV or PORT, there's a relat

Re: Outbound port on sockets

2006-09-14 Thread Sergei Organov
"bmearns" <[EMAIL PROTECTED]> writes: > Quick follow up, I'm able to connect to other external FTP sites behind > my firewall and router, no problem. You've been told already to implement PASV command in your server (then client will be able to use so called passive mode). -- Sergei. -- http:/

Re: Outbound port on sockets

2006-09-14 Thread bmearns
Quick follow up, I'm able to connect to other external FTP sites behind my firewall and router, no problem. -Brian bmearns wrote: > Thanks for all the responses. I understood what the PORT command was > for, but I've been seeing alot of doc online that only mentions going > outbound on port 20 f

Re: Outbound port on sockets

2006-09-14 Thread bmearns
Thanks for all the responses. I understood what the PORT command was for, but I've been seeing alot of doc online that only mentions going outbound on port 20 for data connections, so I thought maybe that was my problem. Sorry if this is the wrong spot to follow up on this not-so-much-python matte

Re: Outbound port on sockets

2006-09-14 Thread billie
> The right format of a FTP PORT command is: > > PORT x,x,x,x,y,z > > ...where x(s) represents your IP address in dotted form and (x * y) the > TCP port you bind. Sorry, I wanted to say: (y * z) -- http://mail.python.org/mailman/listinfo/python-list

Re: Outbound port on sockets

2006-09-14 Thread billie
bmearns wrote > Is it possible to specify which port to use as the outbound port on a > connection? I have the IP address and port number for the computer I'm > trying to connect to (not listening for), but it's expecting my > connection on a certain port. > > Specifically, I'm trying to write an

Re: Outbound port on sockets

2006-09-14 Thread Diez B. Roggisch
bmearns schrieb: > Is it possible to specify which port to use as the outbound port on a > connection? I have the IP address and port number for the computer I'm > trying to connect to (not listening for), but it's expecting my > connection on a certain port. > > Specifically, I'm trying to write

Re: Outbound port on sockets

2006-09-14 Thread Fredrik Lundh
"bmearns" wrote: > Specifically, I'm trying to write an FTP host, and I'm trying to > implement the PORT command. From everything I've read, the client > supplies the IP address and port number for where I'm supposed to > connect to send it data (like a LISTing), and it's expecting me to > connect

Outbound port on sockets

2006-09-14 Thread bmearns
Is it possible to specify which port to use as the outbound port on a connection? I have the IP address and port number for the computer I'm trying to connect to (not listening for), but it's expecting my connection on a certain port. Specifically, I'm trying to write an FTP host, and I'm trying t

Re: Twisted vs POS (Plain-old sockets)

2006-09-04 Thread Jean-Paul Calderone
On Mon, 4 Sep 2006 11:40:33 -0700, Darren Kirby <[EMAIL PROTECTED]> wrote: >> As for documentation, many people say it is lacking, but perhaps one person >> in a thousand points out _how_ or _where_ it is lacking. Unfortunately it >> is difficult to improve things (or even determine if they really

Re: Twisted vs POS (Plain-old sockets)

2006-09-04 Thread Darren Kirby
to the TCP/IP stack is surprisingly difficult to get right. Since > it is extremely unlikely that you actually _care_ about all of the random, > stupid differences between different TCP implementations, you should use > Twisted, since it does its best to hide these differences and instead

Re: Twisted vs POS (Plain-old sockets)

2006-09-04 Thread Istvan Albert
Guido Goldstein wrote: > You might have a look at asyncore/asychat in the standard library. > It does the async stuff for you and it's easy to understand and to > use. or Allegra might work http://laurentszyster.be/blog/allegra/ its anti-twisted melodrama comes at no extra charge. i. -- htt

Re: Twisted vs POS (Plain-old sockets)

2006-09-04 Thread Guido Goldstein
Hi! On Sun, 3 Sep 2006 00:19:17 -0700 "Darren Kirby" <[EMAIL PROTECTED]> wrote: [...] > I guess I am wondering if given the fact I need a custom protocol, and need > to > talk TCP/IP should I stick with twisted or just use plain old sockets and > build it mysel

Re: Twisted vs POS (Plain-old sockets)

2006-09-03 Thread Jean-Paul Calderone
ople who can answer Twisted questions. > >I guess I am wondering if given the fact I need a custom protocol, and need >to >talk TCP/IP should I stick with twisted or just use plain old sockets and >build it myself? Talking to the TCP/IP stack is surprisingly difficult to get right.

Twisted vs POS (Plain-old sockets)

2006-09-03 Thread Darren Kirby
being the biggie.I guess I am wondering if given the fact I need a custom protocol, and need to talk TCP/IP should I stick with twisted or just use plain old sockets and build it myself? Is there a third option I should consider? Have others found themselves in this situation? Thoughts? Comments?

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-15 Thread zxo102
"That twisted example only accepts one client connection" if only one port is available. zxo102 写道: > Bryan, >Thanks for your note. Finally, I have made "one listener socket for > all the connections" work plus Queue-communication between the threads > in wxpython Gui and the threads for s

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-15 Thread zxo102
Bryan, Thanks for your note. Finally, I have made "one listener socket for all the connections" work plus Queue-communication between the threads in wxpython Gui and the threads for socket connections. Trying to make that twisted example code in this topic for "one listener socket-all the co

Re: reading from sockets

2006-08-13 Thread Simon Forman
AndrewTK wrote: > Simon Forman wrote: > > So I'm guessing it's something wrong in your java server. > > Thanks then. I'll keep testing then... Although I don't seem to have > netcat on my unit... > > I'm using a uni computer so I can't install stuff... but I'm guessing > what I wrote is something l

Re: reading from sockets

2006-08-13 Thread AndrewTK
Simon Forman wrote: > So I'm guessing it's something wrong in your java server. Thanks then. I'll keep testing then... Although I don't seem to have netcat on my unit... I'm using a uni computer so I can't install stuff... but I'm guessing what I wrote is something like a basic-basic thingy that

Re: reading from sockets

2006-08-13 Thread AndrewTK
Simon Forman wrote: > So I'm guessing it's something wrong in your java server. Thanks then. I'll keep testing then... -- http://mail.python.org/mailman/listinfo/python-list

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-13 Thread Jean-Paul Calderone
On 12 Aug 2006 21:59:20 -0700, zxo102 <[EMAIL PROTECTED]> wrote: >Jean-Paul, >I just start to learn Twisted. Here is my simple case: I can find >the data sent by clients in dataReceived but I don't know which >client/which port the data is from. After I know where the data comes >from, I can do

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread Bryan Olson
zxo102 wrote: >I am doing a small project using socket server and thread in python. > This is first time for me to use socket and thread things. >Here is my case. I have 20 socket clients. Each client send a set > of sensor data per second to a socket server. The socket server will > do

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread zxo102
Jean-Paul, I just start to learn Twisted. Here is my simple case: I can find the data sent by clients in dataReceived but I don't know which client/which port the data is from. After I know where the data comes from, I can do different things there, for example, write them into different files

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread Jean-Paul Calderone
On 12 Aug 2006 10:44:29 -0700, zxo102 <[EMAIL PROTECTED]> wrote: >Jean-Paul, >Thanks a lot. The code is working. The python twisted is new to me too. >Here are my three more questions: >1. Since the code need to be started in a wxpyhon GUI (either by >clicking a button or up with the GUI), do I ha

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread zxo102
20 threads, each thread takes care of a socket server with a > >different port. > > I want all socket servers start up and wait for client connection. > >In the attached demo code, It stops at the startup of first socket > >server somewhere in the following two lines and

Re: reading from sockets

2006-08-12 Thread Simon Forman
AndrewTK wrote: > > I'm assuming that your server waits to receive the word 'hello' before > > replying with the three strings (first, second, and third)? So once your > > Nope - actually it's a threaded "server", with the main thread simply > dumping network input to the console and command line

Re: start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread Jean-Paul Calderone
t the best way to manage the concurrency present in this application. Instead, consider using non-blocking sockets with an event notification system. For example, using Twisted, your program might look something like this: from twisted.internet import reactor, protocol, defer class CumulativeEcho

start a multi-sockets server (a socket/per thread) with different ports but same host

2006-08-12 Thread zxo102
Hi, I am doing a small project using socket server and thread in python. This is first time for me to use socket and thread things. Here is my case. I have 20 socket clients. Each client send a set of sensor data per second to a socket server. The socket server will do two things: 1. write

Re: reading from sockets

2006-08-12 Thread AndrewTK
Follow up the actual python code is at http://www.dcs.st-and.ac.uk/~atk1/singleclient.py -- http://mail.python.org/mailman/listinfo/python-list

Re: reading from sockets

2006-08-12 Thread AndrewTK
> I'm assuming that your server waits to receive the word 'hello' before > replying with the three strings (first, second, and third)? So once your Nope - actually it's a threaded "server", with the main thread simply dumping network input to the console and command line input being directly dump

Re: reading from sockets

2006-08-10 Thread AlbaClause
AndrewTK wrote: > Hello, > > I'm trying to read data from a socket and I'm not seeing what I'm > expecting it seems to skip the first line of data. I am new to > Python and just trying to test what I can do with it... and it's not > looking pretty. > > > I have some Python code: > [

Re: reading from sockets

2006-08-10 Thread Simon Forman
AndrewTK wrote: > Hello, > > I'm trying to read data from a socket and I'm not seeing what I'm > expecting it seems to skip the first line of data. I am new to > Python and just trying to test what I can do with it... and it's not > looking pretty. > > > I have some Python code: > [

reading from sockets

2006-08-10 Thread AndrewTK
Hello, I'm trying to read data from a socket and I'm not seeing what I'm expecting it seems to skip the first line of data. I am new to Python and just trying to test what I can do with it... and it's not looking pretty. I have some Python code: [-- #! /usr/bin/py

Re: sending binary data over sockets

2006-07-03 Thread Simon Forman
Grant Edwards wrote: > On 2006-07-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > My problem now, is that I need to send certain binary data over a > > socket. That is, I want to make some bytes, and stuff them in a TCP > > packet, send them down the pipe, and then listen for a response. ...

Re: sending binary data over sockets

2006-07-03 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Greetings, since there was no reponse to my previous post about an > existing FastCGI server in python, I've taken to writing my own. (which > of course I'll share--*if* there's something to share ;) > > My problem now, is that I need to send certain binary data over a >

Re: sending binary data over sockets

2006-07-03 Thread thorley
> Are those not the four octets you wanted to send? Yes. My understanding of struct was broken. Sukanta corrected it for me. thank you -- matthew -- http://mail.python.org/mailman/listinfo/python-list

Re: sending binary data over sockets

2006-07-03 Thread thorley
> It will send the 4 bytes, binary, and not the string as you assumed. If > you want to satisfy yourself, run tcpdump (or ethereal) to observe what > is being sent. Thanks very much for the prompt reply. I'll take your word for it. I actually tried ethereal to verify my hypothesis before posting,

Re: sending binary data over sockets

2006-07-03 Thread thorley
> Python strings are binary data and can contain > - in oppostion to e.g. C-strings - null-bytes. > > So it is perfectly alright to send "only" strings over a socket. Agreed. I wasn't trying to imply it was 'wrong' just that the receiving application wouldn't interpret strings correctly. -- ht

Re: sending binary data over sockets

2006-07-03 Thread Grant Edwards
On 2006-07-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > My problem now, is that I need to send certain binary data over a > socket. That is, I want to make some bytes, and stuff them in a TCP > packet, send them down the pipe, and then listen for a response. > > socket.send, as best I can te

Re: sending binary data over sockets

2006-07-03 Thread Sukanta
[EMAIL PROTECTED] wrote: > Greetings, since there was no reponse to my previous post about an > existing FastCGI server in python, I've taken to writing my own. (which > of course I'll share--*if* there's something to share ;) > > My problem now, is that I need to send certain binary data over a >

Re: sending binary data over sockets

2006-07-03 Thread Diez B. Roggisch
Premature sending syndrome... Diez B. Roggisch schrieb: > [EMAIL PROTECTED] schrieb: >> Greetings, since there was no reponse to my previous post about an >> existing FastCGI server in python, I've taken to writing my own. (which >> of course I'll share--*if* there's something to share ;) >> >> My

Re: sending binary data over sockets

2006-07-03 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Greetings, since there was no reponse to my previous post about an > existing FastCGI server in python, I've taken to writing my own. (which > of course I'll share--*if* there's something to share ;) > > My problem now, is that I need to send certain binary data over a

sending binary data over sockets

2006-07-03 Thread thorley
Greetings, since there was no reponse to my previous post about an existing FastCGI server in python, I've taken to writing my own. (which of course I'll share--*if* there's something to share ;) My problem now, is that I need to send certain binary data over a socket. That is, I want to make some

Re: Scatter/gather on sockets?

2006-04-01 Thread Jean-Paul Calderone
On 1 Apr 2006 14:56:02 -0500, Roy Smith <[EMAIL PROTECTED]> wrote: >I've got a bunch of strings in a list: > >vector = [] >vector.append ("foo") >vector.append ("bar") >vector.append ("baz") > >I want to send all of them out a socket in a single send() call, so >they end up in a single packet (assu

Re: Scatter/gather on sockets?

2006-04-01 Thread Paul Rubin
Roy Smith <[EMAIL PROTECTED]> writes: > This is true, but I'm generating the message being sent in very small > chunks (often as small as 4 bytes at a time), and typically need to flush a > packet out onto the network after a few dozen bytes. Maybe at most a few > hundred. I don't know of any

Re: Scatter/gather on sockets?

2006-04-01 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Anthony Greene <[EMAIL PROTECTED]> wrote: > On Sat, 01 Apr 2006 14:56:02 -0500, Roy Smith wrote: > > > I've got a bunch of strings in a list: > > > > vector = [] > > vector.append ("foo") > > vector.append ("bar") > > vector.append ("baz") > > > > I want to send

Re: Scatter/gather on sockets?

2006-04-01 Thread Roy Smith
Peter Hansen <[EMAIL PROTECTED]> wrote: > B. Don't bother trying, because even if the MTU is large enough there is > absolutely no guarantee that the packet will stay intact all the way > through the network anyway (even if you use sendall() instead of send()). This is true, but I'm generating t

Re: Scatter/gather on sockets?

2006-04-01 Thread Anthony Greene
On Sat, 01 Apr 2006 14:56:02 -0500, Roy Smith wrote: > I've got a bunch of strings in a list: > > vector = [] > vector.append ("foo") > vector.append ("bar") > vector.append ("baz") > > I want to send all of them out a socket in a single send() call, so > they end up in a single packet (assuming

Re: Scatter/gather on sockets?

2006-04-01 Thread Peter Hansen
Roy Smith wrote: > I've got a bunch of strings in a list: > > vector = [] > vector.append ("foo") > vector.append ("bar") > vector.append ("baz") > > I want to send all of them out a socket in a single send() call, so > they end up in a single packet (assuming the MTU is large enough). I > can d

Scatter/gather on sockets?

2006-04-01 Thread Roy Smith
I've got a bunch of strings in a list: vector = [] vector.append ("foo") vector.append ("bar") vector.append ("baz") I want to send all of them out a socket in a single send() call, so they end up in a single packet (assuming the MTU is large enough). I can do: mySocket.send ("".join (vector))

Re: sockets, where can I find documentation?

2006-03-03 Thread John Pote
> Where can I get the various papers mentioned in the manual? And as I like > books sitting on the shelf can someone recommend a book on sockets. > > many thanks, > > John Pote > -- http://mail.python.org/mailman/listinfo/python-list

Re: sockets, where can I find documentation?

2006-03-03 Thread Rene Pijlman
e >books sitting on the shelf can someone recommend a book on sockets. Stevens++ -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: sockets, where can I find documentation?

2006-03-03 Thread utabintarbo
For a good general book on networking with python, try Foundations of Python Network Programming by John Goerzen. http://www.amazon.com/gp/product/1590593715/qid=1141390241/sr=1-9/ref=sr_1_9/104-7194399-1227965?s=books&v=glance&n=283155 -- http://mail.python.org/mailman/listinfo/python-list

Re: sockets, where can I find documentation?

2006-03-03 Thread Mc Osten
On Fri, 03 Mar 2006 11:41:05 GMT, John Pote wrote: > Where can I get the various papers mentioned in the manual? And as I like > books sitting on the shelf can someone recommend a book on sockets. Unix Network Programming by Stevens -- USB Priests for only 10$ -- http://mail.pyth

sockets, where can I find documentation?

2006-03-03 Thread John Pote
53 titled Basic Socket Interface Extensions for IPv6. Where can I get the various papers mentioned in the manual? And as I like books sitting on the shelf can someone recommend a book on sockets. many thanks, John Pote -- http://mail.python.org/mailman/listinfo/python-list

Avoiding FTP server timeout for files based on sockets (long posting)

2006-02-08 Thread Stefan Schwarzer
Hi all! For my FTP library module ftputil [1], some users have asked for a way to avoid server timeouts (FTP status code 421). But I haven't found out yet how I can do this in all cases. I try to explain the problem in more detail. The following is rather special and probably not so easy to under

Re: sockets programming with python on mobile phones

2006-01-26 Thread al pacino
co'..:-) AL pacino won an oscar for that. Grant Edwards wrote: > On 2006-01-26, al pacino <[EMAIL PROTECTED]> wrote: > > > Is it possible to write applications using sockets for network > > programming on MOBILE Phones( using Python on mobile phones > > such as nokia

Re: sockets programming with python on mobile phones

2006-01-26 Thread Grant Edwards
On 2006-01-26, al pacino <[EMAIL PROTECTED]> wrote: > Is it possible to write applications using sockets for network > programming on MOBILE Phones( using Python on mobile phones > such as nokia 66* series ) > > actually i want my mobile to 'TALK' to my pc &#

sockets programming with python on mobile phones

2006-01-26 Thread al pacino
Hi everyone, Is it possible to write applications using sockets for network programming on MOBILE Phones( using Python on mobile phones such as nokia 66* series ) actually i want my mobile to 'TALK' to my pc 'WIRELESSLY' so i can send data between the two I think it works

Re: sockets

2006-01-20 Thread Allan Zhang
w.google.co.in, 80) ) s.send( "GET /search?hl=en&q=india&meta= HTTP/1.0\x0d\x0a\x0d\x0a" ) >> while 1: >> buf = s.recv(1000) >> if not buf: >> break >> sys.stdout.write(buf) >> s.close() >> >> the given url is the google s

Re: sockets

2006-01-20 Thread Fredrik Lundh
ta=";, 80)) > s.send("GET") > while 1: > buf = s.recv(1000) > if not buf: > break > sys.stdout.write(buf) > s.close() > > the given url is the google search url for the string india. > can u suggest some way to access the google search r

sockets

2006-01-20 Thread archana sambandam
s.close()   the given url is the google search url for the string india.can u suggest some way to access the google search result page through SOCKETS.    Send instant messages to your online friends http://in.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Linux NETLINK Sockets

2006-01-11 Thread Martin v. Löwis
Jeremy Moles wrote: > http://mail.python.org/pipermail/python-dev/2005-January/050834.html > > ^^ From a year ago or so--did this never get put into Python trunk? As > far as I can tell the answer is no. It's something I'd like to use in > Python if available, though, writing a small wrapper would

Linux NETLINK Sockets

2006-01-11 Thread Jeremy Moles
http://mail.python.org/pipermail/python-dev/2005-January/050834.html ^^ From a year ago or so--did this never get put into Python trunk? As far as I can tell the answer is no. It's something I'd like to use in Python if available, though, writing a small wrapper wouldn't be out of the question if

Re: Sockets on Windows and Mac

2006-01-10 Thread Peter Hansen
rodmc wrote: > I am currently importing the socket library when I write the programs, > I have had no problems with it on my PC at work, but the Mac at home > steadfastly refuses to work. One rule about asking for help in forums like this is to provide adequate background detail about your envir

Re: Sockets on Windows and Mac

2006-01-09 Thread Grant Edwards
On 2006-01-08, rodmc <[EMAIL PROTECTED]> wrote: > I am currently importing the socket library when I write the programs, > I have had no problems with it on my PC at work, but the Mac at home > steadfastly refuses to work. Well, with details like that, we'll have your problem figured out in no ti

<    1   2   3   4   5   6   >