View Single Post
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 09-11-2015 , 13:01   Re: Module: Threaded Sockets
Reply With Quote #28

Let me make myself clear again,
Quote:
This module eliminates looping, hidden looping, entity thinks in plugin as well as in the main thread.
Destro, you are just continuously looping and checking if there is any change in state of the socket, you don't know the exact time when your asyn sockets respond to your command(connect, send,...) similar to the includes aforementioned and hence looping becomes inevitable. But in game engines, we cannot afford that many number of false checking in loops on the same thread on which main HLDS functions are running (that too on StartFrame()). So what my module actually does is, it separates these loops from the main thread and keeps them on a Child Thread, eliminating false checks on the main thread. These child threads will inform the main thread when there is a change in state of the socket and executes a corresponding forward.

Your module is a module level implementation of what Bugsy's includes and others does and is more efficient (ofcourse). You are free to start a new thread in Module Section for your Async-Sockets, but its different from mine (atleast in theory).
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here
Shooting King is offline