public virtual bool SendByChannel(short msgType, P2PMessageBase msg, int channelId)
 {
     this.m_Writer.StartMessage(msgType);
     msg.Serialize(this.m_Writer);
     this.m_Writer.FinishMessage();
     return(this.SendWriter(this.m_Writer, channelId));
 }
Exemple #2
0
 public bool Send(short msgType, P2PMessageBase msg)
 {
     P2PChannelBuffer.s_SendWriter.StartMessage(msgType);
     msg.Serialize(P2PChannelBuffer.s_SendWriter);
     P2PChannelBuffer.s_SendWriter.FinishMessage();
     this.numMsgsOut++;
     return(this.SendWriter(P2PChannelBuffer.s_SendWriter));
 }
 public virtual bool SendUnreliable(short msgType, P2PMessageBase msg)
 {
     return(this.SendByChannel(msgType, msg, 1));
 }
Exemple #4
0
 public void Write(P2PMessageBase msg)
 {
     msg.Serialize(this);
 }