internal UdpConnection(UdpSocket sock, UdpConnectionMode m, UdpEndPoint ep) { socket = sock; mode = m; endpoint = ep; networkRtt = socket.Config.DefaultNetworkPing; aliasedRtt = socket.Config.DefaultAliasedPing; mtu = sock.Config.DefaultMtu; alwaysSendMtu = sock.Config.DefaultAlwaysSendMtu; serializer = sock.CreateSerializer(); state = UdpConnectionState.Connecting; recvTime = socket.GetCurrentTime(); sendTime = recvTime; stats = new UdpConnectionStats(); sendWindow = new UdpRingBuffer <UdpHandle>(sock.Config.PacketWindow); }
internal UdpConnection(UdpSocket sock, UdpConnectionMode m, UdpEndPoint ep) { socket = sock; mode = m; endpoint = ep; networkRtt = socket.Config.DefaultNetworkPing; aliasedRtt = socket.Config.DefaultAliasedPing; mtu = sock.Config.DefaultMtu; alwaysSendMtu = sock.Config.DefaultAlwaysSendMtu; serializer = sock.CreateSerializer(); state = UdpConnectionState.Connecting; recvTime = socket.GetCurrentTime(); sendTime = recvTime; stats = new UdpConnectionStats(); sendWindow = new UdpRingBuffer<UdpHandle>(sock.Config.PacketWindow); }