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.
...
[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
>
> 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
> 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,
> 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
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
[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
>
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
[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
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
10 matches
Mail list logo