From: Stephen D. <sd...@gm...> - 2006-07-10 20:16:58
|
On 7/10/06, Vlad Seryakov <vl...@cr...> wrote: > This is from AS 3.3.1 > > typedef enum { > Ns_DrvIdName, > Ns_DrvIdStart, > Ns_DrvIdAccept, > Ns_DrvIdStop, > Ns_DrvIdInit, > Ns_DrvIdRead, > Ns_DrvIdWrite, > Ns_DrvIdClose, > Ns_DrvIdFree, > Ns_DrvIdPeer, > Ns_DrvIdLocation, > Ns_DrvIdHost, > Ns_DrvIdPort, > Ns_DrvIdSendFd, > Ns_DrvIdSendFile, > Ns_DrvIdDetach, > Ns_DrvIdConnectionFd, > Ns_DrvIdMoveContext, > Ns_DrvIdPeerPort > } Ns_DrvId; > > > AS 3.x had sock driver basically only and it seems too much work for > every driver to reimplement the whole thing, so i would see a driver to > be able to reuse as much as possible what already exists in the server > and if needed can implement some specific functions. > In this case, UDP would implement Recv/Send only, no Accept, the rest > continues as usual. > Also, i would leave for the driver to decide how run, in own thread or > in the main thread. For some rare UDP requests for example which are > used for signaling only, having separate thread is too much overhead. > Right, that's too much to implement. The core server should handle threading etc. I guess it's worth clarifying what the "driver" is. It's not multi-protocol support. It's transport. Plain sockets, SSL, peer2peer network, etc. Protocol sits on top. Many protocols use SSL for example, and it should be possible to reuse the SSL socket driver with each of them. |