Since i didnt see a Network section in the programing forum i'll just post here :0.
Anyways i've got a fairly good understanding about sockets and everything and i'm making my own classes (much smaller then Mr Mikes) to handle just basic communications with them.
I'm making a small chat program to learn a little more about sockets but i've run into a small problem. I dont really understand who or what calls the accept() command. Does it need to be in some kind of loop or something so that when something finnaly does connect it will be able to accept it. Or is it something you can just call once somewhere in the code.
I believe the majority of my code should be fine i think except this one issue because i know the server is listening for a connection i just cant connect to it from my client. I've tested using telnet to connect to my server and its able to gain some kind of connection however, as far as i'm concerned this only proves the server is listening on the correct ip/port.
Secondly, i'm running the server and client on the same computer... problem?
Anyways i've got a fairly good understanding about sockets and everything and i'm making my own classes (much smaller then Mr Mikes) to handle just basic communications with them.
I'm making a small chat program to learn a little more about sockets but i've run into a small problem. I dont really understand who or what calls the accept() command. Does it need to be in some kind of loop or something so that when something finnaly does connect it will be able to accept it. Or is it something you can just call once somewhere in the code.
I believe the majority of my code should be fine i think except this one issue because i know the server is listening for a connection i just cant connect to it from my client. I've tested using telnet to connect to my server and its able to gain some kind of connection however, as far as i'm concerned this only proves the server is listening on the correct ip/port.
Secondly, i'm running the server and client on the same computer... problem?
- Brian Wight