Changeset 21 in cheroxy
- Timestamp:
- 11/08/12 17:24:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main.cpp
r20 r21 18 18 using namespace std; 19 19 20 #ifdef _WIN3221 # define __func__ __FUNCTION__22 #endif23 24 #define CRX_PRINT_ERROR(__code, __message) \25 do { \26 char __error[4096] = {0x00, }; \27 ostringstream __stream; \28 __stream << __message; \29 string __string = __stream.str (); \30 sprintf (__error, "[%s][%d] (%d) %s\n", __func__, __LINE__, __code, __string.c_str ()); \31 cout << __error; \32 } while (0)33 34 20 int main (int argc, char* argv[]) 35 21 { … … 45 31 *----------------------------------------------------------------*/ 46 32 aResult = aSocket.CreateServer (aPort); 33 cout << "Failed to CreateServer." << endl; 47 34 if (aResult < 0) 48 35 { 49 CRX_PRINT_ERROR (aResult, "failed to create server");50 36 return aResult; 51 37 } … … 56 42 if (aResult < 0) 57 43 { 58 CRX_PRINT_ERROR (aResult, "failed to accept");44 cout << "Failed to Accept." << endl; 59 45 break; 60 46 } … … 69 55 if (aResult < 0) 70 56 { 71 CRX_PRINT_ERROR (aResult, "failed to create thread");57 cout << "Failed to forward." << endl; 72 58 break; 73 59 }
Note:
See TracChangeset
for help on using the changeset viewer.