socket problem?

Zajcev Evgeny lg at localhost.rgz.ru
Mon Sep 11 17:10:54 EDT 2000


hi!
i'v got next:

want to use socket.sendto method to send data via TCP
and for example send SYN packet to some host

[21:01][lg at ns][/]# python                                          [p1]
Python 2.0b1 (#15, Sep  7 2000, 19:56:45) 
[GCC 2.95.2 19991024 (release)] on freebsd4
Type "copyright", "credits" or "license" for more information.
>>> import socket
>>> a = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
>>> a.sendto('E\020\000,\001\360@\000@\006t\223\325\270\214d\325\270\214c\0179\000\025X\352\247g\000\000\000`\002\000\004M\000\002\004[@\000', ('mail.rgz.ru', 0))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
socket.error: (49, "Can't assign requested address")
>>> 

i'm fall in out, it doesnt work!
i try with other socket types and protos ==> work perfect but TCP

explain me please where i'm misataken or it is long discovered bug?

--zev



More information about the Python-list mailing list