Mail Archives: djgpp/1995/06/23/12:56:08
Hello to all you djgpp subscribers.
This is really gonna be the last time I try to get my problem solved.
Isn't there anybody to deal with my connectivity problem or did I just
fail to receive the mail due to subscribing lately to the mailing list ?
I've written some kind of database server that allows for accessing the
data repository from a terminal (PC) where no DBMS functionality is
available. So I REALLY need to port this application to the PC.
Since I have installed the
TCP-LIB,
connecting to the workstation was impossible,
The echo server I have written as a sample isn't running when the client
is located on the PC and the server is located on the workstation, while
it works if both the programs are located on the workstation (using the
built-in networking routines and the origin gcc).
This (of course) is NOT due to missing BYTE-ORDERING-ROUTINES !
(I really am not THAT stupid !)
On the workstation the routines (e.g. htonl/s) don't show any
effect, while with the PC they seem to reverse the bytes (and back !)
as they are expected to do.
When connecting to the (up-and-alive) server, the program complains
about EINVAL !
I can't find any DOCUMENTATION about tcp-lib exceeding the contents
of the headers. Is there any kind of error detection supported like
extern int errno;
which could be evaluated to get a hint ?
EINVAL == { EAFNOSUPPORT, EOPNOTSUPPORT, EFAULT, EISCONN, EPROTONOSUPPORT }
mapped to
EIO == { ECONNREFUSED }
That's not too talkative. Isn't it ?
So the only hint I got is that the connection wasn't refused !
/*****************************************************************************/
/* */
/* Have you any idea what the hell I did wrong, or where I can get some docu */
/* about tcp-lib (especially error handling) ? */
/* */
/*****************************************************************************/
Many thanx and good by for this time !
Marcus
the code fragment involved >> -------------------------------------------------
#define SERV_HOST_ADDR "131.176.62.3" /* my station */
#define SERV_TCP_PORT 6004
bzero((char *) &serv_addr, sizeof(cli_addr)); /* clean up structure */
serv_addr.sin_family = AF_INET; /* Internet Protocol */
serv_addr.sin_addr.s_addr = htonl(inet_addr(SERV_HOST_ADDR)); /* the server's host */
serv_addr.sin_port = htons(SERV_TCP_PORT); /* server's port */
- Raw text -