public static async Task <MessageHeader> FromIOAsync(XmlRpcIO io) { int length = BitConverter.ToInt32(await io.ReadBytesAsync(4)); uint handle = BitConverter.ToUInt32(await io.ReadBytesAsync(4)); return(new MessageHeader(length, handle)); }
public static async Task <ConnectHeader> FromIOAsync(XmlRpcIO io) { int length = BitConverter.ToInt32(await io.ReadBytesAsync(4)); string protocol = Encoding.ASCII.GetString(await io.ReadBytesAsync(length)); return(new ConnectHeader(length, protocol)); }
public static async Task <ResponseMessage> FromIOAsync(XmlRpcIO io) { var header = await MessageHeader.FromIOAsync(io); var message = Encoding.UTF8.GetString(await io.ReadBytesAsync(header.MessageLength)); return(new ResponseMessage(header, message)); }