TCP Sockets on V4R5: bind() woes
Patrik Schindler <[email protected]> Sat, 2 Jul 2022 00:12:03 +0200
| Newsgroups | gmane.comp.lang.as400.c |
|---|---|
| Message-ID | <[email protected]> |
Hello, after being busy with other things for quite some time, I'm coming back to getting along with socket programming in C on OS/400. Quite old, though: V4R5. This intentionally. Half a year ago, I finished a UDP socket based "daemon" which works just great. https://github.com/PoC-dev/asterisk-translate-clid But I struggle with getting a simple TCP server to run based on that code. It compiles fine, but emits a bind(): failed: The value specified for the argument is not correct. on the bind() call at line 166. Server code: https://leela.pocnet.net/~poc/txrepd.c If you want to compile and test-run yourself, you need to add an entry to the TCP services table: GO CFGTCP => 21 => 1. The entry is expected to be "sa-txrep", as to be seen in line 151 of the code. When I compare the code steps with the TCP Server example code from Chris Hird, I can't see any obvious error. https://github.com/ChrisHird/OSTOOLS/blob/master/QCSRC/TESTSVR.C Any hints well appreciated! Thanks!! :wq! PoC -- This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/c400-l or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/c400-l. Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com