internal UdpConnection(UdpSocket s, UdpConnectionMode m, UdpEndPoint ep) { socket = s; mode = m; endpoint = ep; stats = new UdpStats(); networkRtt = socket.Config.DefaultNetworkPing; aliasedRtt = socket.Config.DefaultAliasedPing; mtu = socket.Config.PacketSize; alwaysSendMtu = socket.Config.DefaultAlwaysSendMtu; state = UdpConnectionState.Connecting; recvTime = socket.GetCurrentTime(); sendTime = recvTime; sendWindow = new UdpRingBuffer <UdpHandle>(socket.Config.PacketWindow); this.networkPingFilterRttValues = new uint[socket.Config.NetworkPingMedianFilterSize]; this.networkPingFilterSortedIndices = new int[socket.Config.NetworkPingMedianFilterSize]; for (int i = 0; i < this.networkPingFilterSortedIndices.Length; ++i) { this.networkPingFilterSortedIndices[i] = i; } networkPingFilterNextIndexToReplace = 0; serializer = socket.CreateSerializer(); serializer.Connection = this; }
internal UdpConnection(UdpSocket s, UdpConnectionMode m, UdpEndPoint ep) { socket = s; mode = m; endpoint = ep; stats = new UdpStats(); networkRtt = socket.Config.DefaultNetworkPing; aliasedRtt = socket.Config.DefaultAliasedPing; mtu = socket.Config.PacketSize; alwaysSendMtu = socket.Config.DefaultAlwaysSendMtu; state = UdpConnectionState.Connecting; recvTime = socket.GetCurrentTime(); sendTime = recvTime; sendWindow = new UdpRingBuffer <UdpHandle>(socket.Config.PacketWindow); serializer = socket.CreateSerializer(); serializer.Connection = this; }
internal UdpConnection(UdpSocket s, UdpConnectionMode m, UdpEndPoint ep) { socket = s; mode = m; endpoint = ep; stats = new UdpStats(); networkRtt = socket.Config.DefaultNetworkPing; aliasedRtt = socket.Config.DefaultAliasedPing; mtu = socket.Config.PacketSize; alwaysSendMtu = socket.Config.DefaultAlwaysSendMtu; state = UdpConnectionState.Connecting; recvTime = socket.GetCurrentTime(); sendTime = recvTime; sendWindow = new UdpRingBuffer<UdpHandle>(socket.Config.PacketWindow); serializer = socket.CreateSerializer(); serializer.Connection = this; }
internal UdpConnection(UdpSocket s, UdpConnectionMode m, UdpEndPoint ep) { socket = s; mode = m; endpoint = ep; stats = new UdpStats(); networkRtt = socket.Config.DefaultNetworkPing; aliasedRtt = socket.Config.DefaultAliasedPing; mtu = socket.Config.PacketSize; alwaysSendMtu = socket.Config.DefaultAlwaysSendMtu; state = UdpConnectionState.Connecting; recvTime = socket.GetCurrentTime(); sendTime = recvTime; sendWindow = new UdpRingBuffer<UdpHandle>(socket.Config.PacketWindow); this.networkPingFilterRttValues = new uint[socket.Config.NetworkPingMedianFilterSize]; this.networkPingFilterSortedIndices = new int[socket.Config.NetworkPingMedianFilterSize]; for (int i = 0; i < this.networkPingFilterSortedIndices.Length; ++i) { this.networkPingFilterSortedIndices[i] = i; } networkPingFilterNextIndexToReplace = 0; serializer = socket.CreateSerializer(); serializer.Connection = this; }
public ChannelFormatter() { serializer = new UdpSerializer(this); }