Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Kqueue/epoll based interface for TcpSocket and WebSocket
Re: Kqueue/epoll based interface for TcpSocket and WebSocket [message #49797 is a reply to message #49787] Tue, 08 May 2018 12:02 Go to previous message
mirek is currently offline  mirek
Messages: 14264
Registered: November 2005
Ultimate Member
shutalker wrote on Mon, 07 May 2018 09:54
Quote:

But not at the same time, right? That would be a big problem IMO...

Yes.

Quote:

IMO, there will be a class instance that will provide the communication with single client and you will want to let it read the data. You will probably have some container of these instances. In the end, you need to map incomming event to a class instance somehow. If all ID you have is GetSocket, you will need map socket->instance.

There is no need in mapping socket->instance. Let me clear things up with how SocketEventQueue::Wait(...) works. First of all, sockets that need to be tracked for events are attached to the kernel event queue via SocketEventQueue::SubscribeSocket****(...). Then Wait(...) is invoked to obtain pending events from kernel event queue:


I think you got me wrong here. I am speaking about interface (and its use in client code), not about implementation.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help!!! Building 32 bit apps on Ubuntu64
Next Topic: SortedVectorMap - attempting to reference a deleted function error
Goto Forum:
  


Current Time: Wed Jul 02 17:17:49 CEST 2025

Total time taken to generate the page: 0.03968 seconds