![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
when I run a program I everything works correctly. when i run a seperate session and run another instance of the program I get error 29 Descriptor socket is not valid if i open multiple sessions after that i get the same error as above. I am under the impression that socket can handle multiple connections system: unidata on Ibm aix |
#3
| |||
| |||
|
|
On Apr 27, 12:22 am, MVGuru <aivaz... (AT) cinci (DOT) rr.com> wrote: when I run a program I everything works correctly. when i run a seperate session and run another instance of the program I get error 29 Descriptor socket is not valid if i open multiple sessions after that i get the same error as above. I am under the impression that socket can handle multiple connections system: unidata on Ibm aix A bit more info is needed here - are you writing a socket listening program or a client oepneing a socket to a server and sending information, maybe some code examples would help. Rgds Symeon. |
#4
| |||
| |||
|
|
This is a generalized response, not MV specific: A single socket can not handle multiple connections. Each outgoing( connect() ) or incoming( accept() ) connection is assigned a file descriptor for reading and writing to a remote. The listener is also assigned a single file descriptor for the sole purpose of binding to a port on an address. It accepts connections one-at-a-time and then passes them to the accept() handler. You can not re-use any active socket number, for any purpose other than its original state. The same is true for any file handle. Also, make sure that you close socket file handles properly. Don't bail from a socket app without closing all file handles first. If you don't, you could end up fubar-ing the network subsystem. *nix is far more forgiving than Windows, but there is still a possibility that you can "use-up" all available handles in a threaded or forking architecture and have to reboot your box to fix it. Glen "MVGuru" <aivaz... (AT) cinci (DOT) rr.com> wrote in message news:1177629749.389960.50870 (AT) r30g2000prh (DOT) googlegroups.com... when I run a program I everything works correctly. when i run a seperate session and run another instance of the program I get error 29 Descriptor socket is not valid if i open multiple sessions after that i get the same error as above. I am under the impression that socket can handle multiple connections system: unidata on Ibm aix- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
On Apr 27, 11:35 am, "Glen B" <no$pamwebmaster@no$pamforallspec.com wrote: This is a generalized response, not MV specific: A single socket can not handle multiple connections. Each outgoing( connect() ) or incoming( accept() ) connection is assigned a file descriptor for reading and writing to a remote. The listener is also assigned a single file descriptor for the sole purpose of binding to a port on an address. It accepts connections one-at-a-time and then passes them to the accept() handler. You can not re-use any active socket number, for any purpose other than its original state. The same is true for any file handle. Also, make sure that you close socket file handles properly. Don't bail from a socket app without closing all file handles first. If you don't, you could end up fubar-ing the network subsystem. *nix is far more forgiving than Windows, but there is still a possibility that you can "use-up" all available handles in a threaded or forking architecture and have to reboot your box to fix it. Glen "MVGuru" <aivaz... (AT) cinci (DOT) rr.com> wrote in message news:1177629749.389960.50870 (AT) r30g2000prh (DOT) googlegroups.com... when I run a program I everything works correctly. when i run a seperate session and run another instance of the program I get error 29 Descriptor socket is not valid if i open multiple sessions after that i get the same error as above. I am under the impression that socket can handle multiple connections system: unidata on Ibm aix- Hide quoted text - - Show quoted text - I am trying to run multiple client side software to a single socket listening host server. Ex: CLIENT ------------------------> server1 When this instance is run there are no issues. When subsequent sessions are started it has a socket error of 18 and then 14 and then 29 Which mean 18 is an ECONNRESET 14 is ESHUTDOWN and 29 is EBADF The openSocket works correctly, just the writeSocket has the problems when opening multiple clients and obviously no data comes back from the server CLIENT ------------------------> server1 CLIENT ------------------------> server1 CLIENT ------------------------> server1 Theo |
![]() |
| Thread Tools | |
| Display Modes | |
| |