- Timestamp:
- 11/20/12 19:49:10 (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/CRXProxy.h
r35 r36 24 24 { 25 25 private: 26 bool mIsIntercepted;27 28 26 CRXSocket mClient; 29 27 CRXSocket mServer; 28 29 int mServerTimeout; 30 30 31 31 CRXHttpRequest mHttpRequest; … … 45 45 46 46 void SetClientSocket (const int aSocket); 47 void SetServerTimeout (const int aTimeout = TCPSOCKET_NO_TIMEOUT); 47 48 void Close (void); 48 49 … … 59 60 int Forward (void); 60 61 62 int ReceiveRequest (void); 63 int SendRequest (void); 64 65 int ReceiveResponse (void); 66 int SendResponse (void); 67 68 public: 69 /* HTTP data */ 61 70 void SetHttpRequest (const char * aHttpRequest); 62 71 char * GetHttpRequest (char * aBuffer, … … 72 81 int GetHttpResponseBodyLength (void) const; 73 82 74 int ReceiveRequest (void);75 int SendRequest (void);76 77 int ReceiveResponse (void);78 int SendResponse (void);79 83 }; 80 84 -
trunk/src/CRXProxy.cpp
r35 r36 10 10 11 11 CRXProxy::CRXProxy (void) 12 : m IsIntercepted (false),13 m Client(0),14 mServer (0)12 : mClient (0), 13 mServer (0), 14 mServerTimeout (0) 15 15 { 16 16 /*----------------------------------------------------------------*/ … … 50 50 51 51 mClient = aSocket; 52 /*----------------------------------------------------------------*/ 53 } 54 55 void 56 CRXProxy::SetServerTimeout (const int aTimeout) 57 { 58 /*----------------------------------------------------------------*/ 59 mServerTimeout = aTimeout; 52 60 /*----------------------------------------------------------------*/ 53 61 } … … 273 281 { 274 282 /* connect */ 275 aResult = mServer.Connect (mHttpRequest.GetHost (), mHttpRequest.GetPort (), 1);283 aResult = mServer.Connect (mHttpRequest.GetHost (), mHttpRequest.GetPort (), mServerTimeout); 276 284 if (aResult < 0) 277 285 { -
trunk/src/main.cpp
r35 r36 99 99 100 100 aProxy->SetClientSocket (aResult); 101 aProxy->SetServerTimeout (2); 101 102 aProxy->SetRequestFilter (CRX_FILTER_REQUEST_FILE_EXTENSION, 102 103 CRX_FILTER_MATCHED,
Note:
See TracChangeset
for help on using the changeset viewer.