question: python and UDP

Peter Hansen peter at engcorp.com
Sun Mar 24 23:17:16 EST 2002


ricky wrote:
> 
> Peter Hansen wrote:
> > ricky wrote:
> > >
> > > I am trying to write a python program to connect to a proxy server which
> > > takes the following header:
> > > however, the proxy server doesn't seem to understand the header i sent
> > > to it.
> >
> > Are you looking for the 'struct' module?  That should be enough to
> > produce the header format you need.

> how would i use the struct module?

Well, you could start by looking at the documentation on it, and
asking specific questions to clarify any misunderstanding that
remains.  If you don't know where to look for the documentation,
feel free to ask.

If you post some sample code which you've tried, we can probably
explain why the "server doesn't seem to understand the header"
you sent it, and if you try using struct and still have trouble,
post samples of your efforts and we can work on improving those.

(You haven't given enough info yet for anyone to just write
the code for you, even though there are likely people here
who would be happy to do that.  I'm generally not one of them.)

-Peter



More information about the Python-list mailing list