yes here is part of the code,(server is a windows application connected by a crossed ethernet to the TS, with a few options to change). Maybe the problem is here? int client; struct sockaddr_in ACS; client = socket(AF_INET,SOCK_STREAM,0); ACS.sin_family = AF_INET; ACS.sin_addr.s_addr = inet_addr("192.168.0.60"); ACS.sin_port = htons(6001); if (connect(client,(struct sockaddr*)&ACS,sizeof(ACS))<0) { "Error when connecting" retrying, etc.... } else continue...
To: From: Date: Sun, 27 Sep 2009 12:24:40 -0400 Subject: Re: [ts-7000] ts7800 connect socket‏
joygom22 wrote:
> hi everybody,
> i have a ts7800 and thanks to this forum i advanced very much, but now i have a problem with sockets:
> if i do in the program i'm runnign:
>
> if connect(s,(struct sockaddr*)&server,sizeof(server))<0 // (1)
> {..'the connection is not possible, retrying...etc.}
> else
> {ok etc...continue program}
>
> if the server is runnig, everything is ok, but when i close the server and run then program in the ts7800 to see errors, it stay in the line (1) all the time.
Well, how do you have the socket setup? I'm confused why you're casting
server to sockaddr, could you also post the declaration and setup of
server please?
--
Jason Stahls
Comparte tus fotos con tus amigos. Más fácil con Windows Live
__._,_.___
__,_._,___
|
|