[SDL] problem with using socket from SDL_Net SDLNet_TCP_Accept - sorry for the previous message

Clemens Kirchgatterer clemens at 1541.org
Sun Mar 4 00:55:03 PST 2007


bebe unknown <itay390 at yahoo.com> wrote:

> >You didn't open it a second time in the source code you posted.
> 
> i don't really understand, i think i did open it both in the first
> time and in the second time. is that what this line meant to do,
> isn't it? while (!(somecomputer = SDLNet_TCP_Accept
> (listeningsocket))); the program waits for a message from the
> listening socket

no, it waits for a remote socket to "connect". it does not read any
data from the remote side. from all your posts, it seems you miss the
very basics of network programming. at least that's the impression i
got, sorry if i'm wrong. so i suggest you first try to get your hands
on a book, or at least some online tutorials. you should read the
man pages for open (), close(), socket (), connect(), listen(), accept
(), read() and write().

btw. your posted source was completly messed up (no indention) so i
didn't even bother reading it. posting with a real name wouldn't hurt
either.

best regards ...
clemens


More information about the SDL mailing list