Celebrating the 22th anniversary of the UltraVNC: https://forum.uvnc.com/viewtopic.php?t=38031
Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

question regarding networking code..

Post Reply
creationstation
Posts: 3
Joined: 2004-11-10 19:08

question regarding networking code..

Post by creationstation »

I've been reading through the code to get a feel for the program flow. I'm a little confused about how network connections are multiplexed if you have a listening vncviewer handling multiple server connections.

example,
computer A starts vncviewer in listen mode.
computer B starts winvnc and connects to computer A
computer C starts winvnc and connects to computer A.

I see code in Daemon.cpp that handles the FD_READ event, and sticks the incoming bytes into _this->netbuf. what I don't understand is how does this incoming information discriminate between ClientConnection-B and ClientConnection-C?

not sure if my question is clear.. basically i see where the data comes into the listener, but i don't see where each ClientConnection object handles their own socket connection. What am I missing here?

Thanks for your help.
creationstation
Posts: 3
Joined: 2004-11-10 19:08

answered my own question

Post by creationstation »

just noticed to SetSocketOptions() function.. the socket for a client connection is passed to a new FdInStream() object.. now i get it.

sorry for the dumb question
Post Reply