Beispiel #1
0
 public NetworkMessage(MsgSegment header_, MsgSegment body_)
 {
     adress  = new MsgSegment(senderId, ServerId);
     header  = header_;
     body    = new MsgSegment[1];
     body[0] = body_;
 }
Beispiel #2
0
 /// <summary>
 /// 수신자 미기재시 디폴트로 서버를 수신자로 함
 /// </summary>
 public NetworkMessage(string attr_, string content_)
 {
     adress  = new MsgSegment(senderId, ServerId);
     header  = new MsgSegment();
     body    = new MsgSegment[1];
     body[0] = new MsgSegment(attr_, content_);
 }
Beispiel #3
0
    /// Exception...? muk nun go im?
    public NetworkMessage(string rawString)
    {
        string[] segment = rawString.Split('/');
        string[] split;

        //Adress
        split  = segment[0].Split(':');
        adress = new MsgSegment(split[0], split[1]);

        //Header
        split  = segment[1].Split(':');
        header = new MsgSegment(split[0], split[1]);

        //Body
        body = new MsgSegment[segment.Length - 2];
        for (int loop = 0; loop < segment.Length - 2; loop++)
        {
            split      = segment[loop + 2].Split(':');
            body[loop] = new MsgSegment(split[0], split[1]);
        }
    }
Beispiel #4
0
 public void StartSendPos()
 {
     msgHeader = new MsgSegment(MsgSegment.AttrCharacter, networkId.ToString());
     msgBody   = new MsgSegment();
     StartCoroutine(SendPosRoutine());
 }
Beispiel #5
0
 public NetworkMessage(string dest_, MsgSegment[] body_)
 {
     adress = new MsgSegment(senderId, ServerId);
     header = new MsgSegment();
     body   = body_;
 }