private DataPackage SendAndRecieve(DataPackage p) { var socket = SocketPool.Rent(_options.Host, _options.Port); var res = SocketPool.SendAndResieve(socket, p.ToArray()); SocketPool.Return(socket); return(new DataPackage(res)); }
public void Dispose() { Disconnect(); _clientAes?.Dispose(); SocketPool.Clear(); }