pub enum TcpCommunicationError {
Show 13 variants
ConnectionFailed {
location: String,
ip_address: String,
port: u16,
source: Error,
},
WritingToStreamFailed {
location: String,
source: Error,
},
FlushFailed {
location: String,
source: Error,
},
ReadingFromStreamFailed {
location: String,
source: Error,
},
IllegalSignalRequestToSimulator(String, AquariumSignal),
ResponseConversionError {
location: String,
last_word: String,
source: ParseFloatError,
},
LastWordOfResponseEmpty(String),
ResponseContainsNoWords(String),
SendingResponseViaChannelFailure(String),
ChannelDisconnected(String),
ReceivingFromTCPThreadFailed {
location: String,
requester: String,
source: AquaChannelError,
},
SendingToTCPThreadFailed {
location: String,
requester: String,
source: AquaChannelError,
},
StreamCloneFailed {
location: String,
source: Error,
},
}Expand description
Contains the error definition for communication with the simulator via TCP
Variants§
ConnectionFailed
value indicates that an error has occurred during TCP communication
WritingToStreamFailed
value indicates that an error has occurred during writing to a TCP stream
FlushFailed
value indicates that an error has occurred during flushing a TCP stream
ReadingFromStreamFailed
value indicates that an error has occurred during reading from a TCP stream
IllegalSignalRequestToSimulator(String, AquariumSignal)
value indicates that calling function requested an undefined signal
ResponseConversionError
value indicates that conversion of response from String to numeric failed
LastWordOfResponseEmpty(String)
value indicates that the last word of response is empty
ResponseContainsNoWords(String)
value indicates that the response does not contain any words
SendingResponseViaChannelFailure(String)
value indicates that sending response value via the channel failed
ChannelDisconnected(String)
value indicates that channel disconnected unexpectedly
ReceivingFromTCPThreadFailed
value indicates that receiving from TCP thread failed
SendingToTCPThreadFailed
value indicates that communication to TCP thread failed
StreamCloneFailed
The TCP stream could not be cloned, which is necessary for creating separate read and write handles.