| Reply | « Previous Thread | Next Thread » |
|
Hi
Does anyone know why using version 1.4.2 final the following error occurs? from socket import * serverHost = '' serverPort = 2000 s = socket(AF_INET, SOCK_STREAM) # create a TCP socket s.connect((serverHost, serverPort)) # connect to server on the port This results in an error on the s.connect() call: error: (22, 'Invalid argument') A similar error occurs if you call s.bind() both scripts work fine in other environments. I am also not sure why some standard library modules are missing for example all of BaseHTTPServer and SocketServer are not available. Anyone have any ideas? Regards |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
The "invalid argument" error is because you specify the argument as a tuple. It should be s.connect(serverHost, serverPort) (one set of brackets).
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Failed to connect a TCP client app with a server | abolfoooud | Symbian Networking & Messaging | 10 | 2008-08-24 08:47 |
| TCP server packet receiving problem | raj_rr7 | Symbian Networking & Messaging | 9 | 2007-07-12 13:24 |
| bind pbm in server socket | rees | Symbian Networking & Messaging | 0 | 2006-11-15 14:15 |
| Socket problem | defragger | Python | 0 | 2005-08-25 09:16 |
| socket问题请教 | sword-jj | Symbian | 2 | 2003-07-08 16:23 |