Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include <string>
00009 #include <network_interface.h>
00010
00011 std::string AS::Network::return_status_desc(const return_statuses &ret)
00012 {
00013 std::string status_string;
00014
00015 if (ret == INIT_FAILED)
00016 {
00017 status_string = "Initialization of the network interface failed.";
00018 }
00019 else if (ret == BAD_PARAM)
00020 {
00021 status_string = "A bad parameter was provided to the network interface during initalization.";
00022 }
00023 else if (ret == SOCKET_ERROR)
00024 {
00025 status_string = "A socket error was encountered.";
00026 }
00027 else if (ret == SOCKET_CLOSED)
00028 {
00029 status_string = "Socket is not currently open.";
00030 }
00031 else if (ret == NO_MESSAGES_RECEIVED)
00032 {
00033 status_string = "No messages were received on the interface.";
00034 }
00035 else if (ret == READ_FAILED)
00036 {
00037 status_string = "A read operation failed on the network interface.";
00038 }
00039 else if (ret == WRITE_FAILED)
00040 {
00041 status_string = "A write operation failed on the network interface.";
00042 }
00043 else if (ret == CLOSE_FAILED)
00044 {
00045 status_string = "Closing the network failed.";
00046 }
00047
00048 return status_string;
00049 }