This commit is contained in:
moznion
2020-11-28 15:40:31 +09:00
parent 2d2069b0ab
commit dc1fbe85ad
2 changed files with 3 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ impl RequestHandler<(), io::Error> for MyRequestHandler {
info!("response => {:?} to {}", code, req.get_remote_addr());
conn.send_to(
&req_packet.response(code).encode().unwrap(),
&req_packet.make_response_packet(code).encode().unwrap(),
req.get_remote_addr(),
)
.await?;

View File

@@ -70,7 +70,7 @@ impl Packet {
})
}
pub fn response(&self, code: Code) -> Self {
pub fn make_response_packet(&self, code: Code) -> Self {
Packet {
code,
identifier: self.identifier,
@@ -136,7 +136,7 @@ impl Packet {
* | Attributes ...
* +-+-+-+-+-+-+-+-+-+-+-+-+-
*/
pub fn marshal_binary(&self) -> Result<Vec<u8>, String> {
fn marshal_binary(&self) -> Result<Vec<u8>, String> {
let encoded_avp = match self.attributes.encode() {
Ok(encoded) => encoded,
Err(e) => return Err(e),