Scket connection to server

Grant Edwards grante at visi.com
Thu Jun 30 18:47:02 EDT 2005


On 2005-06-30, André Egners <andre.egners at rwth-aachen.de> wrote:

>>> I would like to establish a socket connection to a server
>>> running a service on port 29999. the host address is
>>> 10.214.109.50. how do i do this using python?
>>>
>>> many thanks
>>>
>>>
>> 
>> Off the top of my head (so there could be errors):
>> 
>> import socket
>> s = socket.Socket()
>> s.connect((10.214.109.50, 29999))
>> s.send("Hello, Mum\r\n")
>
> Just curious...where do these messages show up @10.214.109.50?

Um, at port 29999?

-- 
Grant Edwards                   grante             Yow!  does your DRESSING
                                  at               ROOM have enough ASPARAGUS?
                               visi.com            



More information about the Python-list mailing list