pub struct SecureSocket { /* private fields */ }Implementations§
Source§impl SecureSocket
impl SecureSocket
Sourcepub fn new(sock: TcpStream, role: SocketRole) -> Option<SecureSocket>
pub fn new(sock: TcpStream, role: SocketRole) -> Option<SecureSocket>
Create a brand spankin’ new Secure Socket.
I believe the arguments are more or less self-explanatory, so I won’t bother to explain them.
pub fn recv(&mut self) -> Result<String, Reason>
pub fn close_conn(&mut self)
Sourcepub fn recv_file(&mut self) -> Result<String, Reason>
pub fn recv_file(&mut self) -> Result<String, Reason>
Receive a file
Returns: Result of either filename or error reason. Error mapping:
- BadData: Client sent gibberish
- Other: Unable to open file for writing or unable to write to it.
The file name will be in the format “<hostname> <time>.tar.gz”
TODO implement SecureSocket::recv_archive()
Auto Trait Implementations§
impl Freeze for SecureSocket
impl !RefUnwindSafe for SecureSocket
impl !Send for SecureSocket
impl !Sync for SecureSocket
impl Unpin for SecureSocket
impl !UnwindSafe for SecureSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more