public static RetInt createRoom() { TTransport transport = null; RetInt result = null; try { transport = new TSocket(AR_CLOUD_ADDR, AR_CLOUD_PORT); transport.Open(); TProtocol protocol = new TBinaryProtocol(transport); ARCloud.Client client = new ARCloud.Client(protocol); result = client.createRoom(); } catch (TException e) { Debug.LogError(e.Message); } finally { if (transport != null) { transport.Close(); } } return(result); }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.Struct) { Success = new RetInt(); Success.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }