Home » U++ Library support » U++ MT-multithreading and servers » Socket functions calling order
Re: Socket functions calling order [message #13692 is a reply to message #13620] |
Tue, 22 January 2008 18:20  |
captainc
Messages: 278 Registered: December 2006 Location: New Jersey, USA
|
Experienced Member |
|
|
zaurus, thanks for that example. I was definitely confused as to the reading and writing on the same socket as listening. I am new to socket programming, so I made the assumption that the socket that sees the initial connection had to be used to transfer information.
I still wonder, how does Accept() work together with ServerSocket()?
On my initial analysis through the source code,
Calling ServerSocket() on a socket doesn't seem to implicitly call Accept() for that socket, although both ServerSocket() and Accept() call Attach(data) on the socket.
Further, ServerSocket() calls OpenServer(), which calls lower level calls bind() and listen() on the socket. Accept() calls lower level accept() on the socket.
Would you mind showing the full example of the main loop you provided?
|
|
|
Goto Forum:
Current Time: Sat Jun 14 23:06:16 CEST 2025
Total time taken to generate the page: 0.04389 seconds
|