Winsock call to UNIX

Erik Hensema erik.hensema@group2000.nl
Thu Sep 30 23:42:00 GMT 1999


> -----Original Message-----
> From: Zhang, John [ mailto:John.Zhang@neonsoft.com ]
>> I installed Be 20.1, finished porting on NT 40. compiled with
> libwinsock32.a.
> Now the socket calls work fine on NT when a client and a 
> server talking to
> each other.
> But when calling from NT to a UNIX (server or client), 
> sockets never go
> thru, i.e. a ported application cannot talk to the original UNIX
> application. 

Maybe a little/big endian issue? You cannot use constructions like this:
char *buf[SIZE];
int x;
/* read in the buffer here */
memcpy((void *)&x, buf+X_OFFSET, sizeof(int)); /* WRONG! */
You should use the htons() and htonl() functions on win32 in order to
correct the little/big endian problem.
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /