lukasz-pyrzyk / Kronos

Kronos - Open Source distributed cache system
Other
22 stars 5 forks source link

Reuse of the sockets #53

Closed lukasz-pyrzyk closed 7 years ago

lukasz-pyrzyk commented 8 years ago

This issue generate huge overhead on recreating sockets

public SocketCommunicationService(IPEndPoint host) : this(host, () => new XGainSocket(AddressFamily.InterNetwork))
        {
        }

        internal SocketCommunicationService(IPEndPoint host, Func<ISocket> newSocketFunc)
        {
            _host = host;
            _newSocketFunc = newSocketFunc;
        }
public async Task<byte[]> SendToServerAsync(Request request)
        {
            ISocket socket = _newSocketFunc();
[...
}
lukasz-pyrzyk commented 7 years ago

Nope, will be replaced with https://github.com/davidfowl/Channels