Changeset 26:46f4e06241c7 in xplcommon for src/xplcommon/win32/LocalSocket.h
- Timestamp:
- 01/02/13 08:04:37 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/win32/LocalSocket.h
r22 r26 58 58 static void setupPath(char* dest, const char* name); 59 59 60 /**61 * Create a new named pipe with the proper settings. The handle62 * will be returned on successful creation.63 *64 * @param name the name of the pipe to create. It should be the65 * final name, not the user-given one.66 *67 * @return the handle if the pipe could be created.68 */69 static HANDLE createNamedPipe(const char* name, bool overlapped);70 71 /**72 * Connect the named pipe with the given handle.73 *74 * @return true if the connection is established. If overlapped is75 * 0 and false is returned, it has failed. If overlapped is not 0,76 * the failer status of the Failable associated with the77 * Overlapped instance provides failure information.78 */79 static bool connectNamedPipe(HANDLE handle, Overlapped* overlapped);80 81 60 protected: 82 61 /** … … 105 84 { 106 85 snprintf(dest, 256, "\\\\.\\pipe\\%s", name); 107 }108 109 //------------------------------------------------------------------------------110 111 inline bool LocalSocket::connectNamedPipe(HANDLE handle, Overlapped* overlapped)112 {113 OVERLAPPED* ol = (overlapped==0) ? 0 : overlapped->get();114 bool result = ConnectNamedPipe(handle, ol);115 if (overlapped!=0) {116 DWORD dummy = 0;117 result = overlapped->getResult(dummy, handle);118 }119 return result;120 86 } 121 87
Note:
See TracChangeset
for help on using the changeset viewer.