public void OnConnected(SocketError err) { if (err == SocketError.Success) { Debug.Log("连接"); var msg = new mmopb.login_ack(); msg.error = "Hello!"; tcpConnection.Send(ProtoHelper.EncodeWithName(msg)); } }
public void SendMessage(object o) { tcpConnection.Send(ProtoHelper.EncodeWithName(o)); }