TCP echo server
This commit is contained in:
@@ -4,6 +4,8 @@ pub type Reason {
|
||||
/// from `send`
|
||||
Closed
|
||||
|
||||
Overflow
|
||||
|
||||
/// Address already in use
|
||||
Eaddrinuse
|
||||
/// Cannot assign requested address
|
||||
@@ -158,6 +160,7 @@ pub type Reason {
|
||||
|
||||
pub fn to_string(reason: Reason) -> String {
|
||||
case reason {
|
||||
Overflow -> "overflow"
|
||||
Closed -> "Connection closed (closed)"
|
||||
Eacces -> "Permission denied (eacces)"
|
||||
Eaddrinuse -> "Address already in use (eaddrinuse)"
|
||||
|
||||
Reference in New Issue
Block a user