Mercurial > flash_v2
comparison host/tools/Utils/common/eCosSocket.h @ 126:518f42066aba ecos-sw-2000-09-19
Merge from eCos master repository on 2000-09-19-06:25:26-BST
| author | jlarmour |
|---|---|
| date | Tue, 19 Sep 2000 05:53:51 +0000 |
| parents | 6736c52df507 |
| children |
comparison
equal
deleted
inserted
replaced
| 125:b4407dc7f59d | 126:518f42066aba |
|---|---|
| 162 static LPCTSTR MySimpleHostName(); | 162 static LPCTSTR MySimpleHostName(); |
| 163 | 163 |
| 164 // Set up a connection between two sockets. Traffic is simply passed between them. | 164 // Set up a connection between two sockets. Traffic is simply passed between them. |
| 165 bool ConnectSocketToSocket (CeCosSocket &o,FilterFunc *pSocketToSocketFilterFunc1,FilterFunc *pSocketToSocketFilterFunc2,void *pParam,bool *pbStop); | 165 bool ConnectSocketToSocket (CeCosSocket &o,FilterFunc *pSocketToSocketFilterFunc1,FilterFunc *pSocketToSocketFilterFunc2,void *pParam,bool *pbStop); |
| 166 | 166 |
| 167 enum SSReadResult {SS_SOCKET_ERROR=-1,SS_SOCKET_READ=1,SS_SERIAL_ERROR=-2,SS_SERIAL_READ=2,SS_STOPPED=0}; | |
| 168 | |
| 167 protected: | 169 protected: |
| 168 | 170 |
| 169 // Blocking read on one or other of the data sources: | 171 // Blocking read on one or other of the data sources: |
| 170 // Result: -1 - socket error occurred | 172 // Result: -1 - socket error occurred |
| 171 // 1 - data read from socket | 173 // 1 - data read from socket |
| 172 // -2 - serial error occurred | 174 // -2 - serial error occurred |
| 173 // 2 - data read from serial | 175 // 2 - data read from serial |
| 174 | 176 |
| 175 enum SSReadResult {SS_SOCKET_ERROR=-1,SS_SOCKET_READ=1,SS_SERIAL_ERROR=-2,SS_SERIAL_READ=2,SS_STOPPED=0}; | |
| 176 static SSReadResult SSRead (CeCosSerial &serial,CeCosSocket &socket,void *pBuf,unsigned int nSize,unsigned int &nRead,bool *pbStop); | 177 static SSReadResult SSRead (CeCosSerial &serial,CeCosSocket &socket,void *pBuf,unsigned int nSize,unsigned int &nRead,bool *pbStop); |
| 177 | 178 |
| 178 Duration m_nDefaultTimeout; | 179 Duration m_nDefaultTimeout; |
| 179 Duration TimeoutDuration (Duration dTimeout); | 180 Duration TimeoutDuration (Duration dTimeout); |
| 180 // Set appropriate socket options (most importantly, non-blocking mode) | 181 // Set appropriate socket options (most importantly, non-blocking mode) |
