OS/2, eCS & ArcaOS - Technical > Networking
Networking: socket() returns positive `non-socket`
(1/1)
agena.info:
Hello,
I am having a big problem with socket programming in C:
Every time I open a socket with:
int sock = socket(AF_INET, SOCK_STREAM, 0);
and try to bind or connect later on I get an 88 error code, claiming that these functions have been called with a non-socket (`Socket operation on non-socket`).
The result returned by socket is always a positive integer, mostly starting from 3.
I even included a call to the undocumented addsockettolist() function after opening the socket, but to no avail.
What am I doing wrong ? I use ArcaOS 5.0.6 and Paul Smedley's GCC 4.4.6 and 8.3.0.
The C code that is run on ArcaOS to open, bind, connect, etc. is the very same as with Windows, Solaris, Linux, Mac OS X, where everyting works fine.
Any help would be appreciated.
Thank you,
Alex
Dave Yeo:
I'd patiently wait for a response from someone who knows this stuff. For many it is a long weekend.
Which headers are you using? Are you linking against libcx (-lcx). Also what cflags/ldflags are you using?
Navigation
[0] Message Index
Go to full version