Example #1
0
    private void SendWriterTo(int connection_id, P2PNetworkWriter writer, int channel_id)
    {
        P2PConnection p2PConnection = this.FindConnection(connection_id);

        if (p2PConnection == null)
        {
            return;
        }
        p2PConnection.SendWriter(writer, channel_id);
    }
Example #2
0
    public void SendWriterTo(P2PPeer peer, P2PNetworkWriter writer, int channel_id)
    {
        P2PConnection p2PConnection = this.FindConnection(peer);

        if (p2PConnection == null || !p2PConnection.m_IsReady)
        {
            if (P2PLogFilter.logError)
            {
                if (p2PConnection == null)
                {
                    Debug.LogError("Trying to send data without connection for peer: " + peer.GetHostId());
                    return;
                }
                Debug.LogError("Trying to send data on unready connection connection_id:" + p2PConnection.m_ConnectionId);
            }
            return;
        }
        p2PConnection.SendWriter(writer, channel_id);
    }