Ejemplo n.º 1
0
        public override void ServerSend(int connectionId, int channelId, ArraySegment <byte> segment)
        {
            // switch to kcp channel.
            // unreliable or reliable.
            // default to reliable just to be sure.
            switch (channelId)
            {
            case Channels.DefaultUnreliable:
                server.Send(connectionId, segment, KcpChannel.Unreliable);
                break;

            default:
                server.Send(connectionId, segment, KcpChannel.Reliable);
                break;
            }
        }
Ejemplo n.º 2
0
        public override void ServerSend(int connectionId, ArraySegment <byte> segment, int channelId)
        {
            server.Send(connectionId, segment, ToKcpChannel(channelId));

            // call event. might be null if no statistics are listening etc.
            OnServerDataSent?.Invoke(connectionId, segment, channelId);
        }
Ejemplo n.º 3
0
 public override void ServerSend(int connectionId, ArraySegment <byte> segment, int channelId)
 {
     server.Send(connectionId, segment, ToKcpChannel(channelId));
 }
Ejemplo n.º 4
0
 public override void ServerSend(int connectionId, int channelId, ArraySegment <byte> segment)
 {
     server.Send(connectionId, segment);
 }