Struct socks5_protocol::CommandResponse [−][src]
pub struct CommandResponse {
pub reply: CommandReply,
pub address: Address,
}Expand description
CommandResponse message:
+-----+-------+------+----------+----------+
| REP | RSV | ATYP | BND.ADDR | BND.PORT |
+-----+-------+------+----------+----------+
| 1 | X'00' | 1 | Variable | 2 |
+-----+-------+------+----------+----------+
Fields
reply: CommandReplyExpand description
Reply (REP).
address: AddressExpand description
Address (ATYP, BND.ADDR, BND.PORT).
Implementations
impl CommandResponse[src]
impl CommandResponse[src]pub fn success(address: Address) -> CommandResponse[src]
pub fn success(address: Address) -> CommandResponse[src]Create a success CommandResponse with bind address.
pub fn reply_error(reply: CommandReply) -> CommandResponse[src]
pub fn reply_error(reply: CommandReply) -> CommandResponse[src]Create a error CommandResponse with reply.
pub fn error(e: impl TryInto<Error>) -> CommandResponse[src]
pub fn error(e: impl TryInto<Error>) -> CommandResponse[src]Create a error CommandResponse with any io::error.