Esempio n. 1
0
    public int SendData(CELLWriteStream stream)
    {
        if (_cppClientObj == IntPtr.Zero)
        {
            return(0);
        }

        return(CELLClient_SendWriteStream(_cppClientObj, stream.Data));
    }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        Creat();
        Connect(_ip, _port);

        CELLWriteStream stream = new CELLWriteStream();

        stream.SetNetCMD(CMD.CMD_LOGOUT);
        stream.WriteInt8(1);
        stream.WriteInt16(2);
        stream.WriteInt32(3);
        stream.WriteFloat(4.5f);
        stream.WriteDouble(6.7);
        stream.WriteString("client");
        stream.WriteString("ahah");
        int [] b = { 1, 2, 3, 4, 5 };
        stream.WriteInts(b);
        stream.Finsh();
        SendData(stream);
        stream.Release();
    }