Changeset 36 for pjproject/main/pjlib/src/pj/ioqueue_winnt.c
- Timestamp:
- Nov 9, 2005 3:37:19 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/main/pjlib/src/pj/ioqueue_winnt.c
r19 r36 892 892 #endif /* #if PJ_HAS_TCP */ 893 893 894 895 896 PJ_DEF(pj_bool_t) pj_ioqueue_is_pending( pj_ioqueue_key_t *key, 897 pj_ioqueue_op_key_t *op_key ) 898 { 899 BOOL rc; 900 DWORD bytesTransfered; 901 902 rc = GetOverlappedResult( key->hnd, (LPOVERLAPPED)op_key, 903 &bytesTransfered, FALSE ); 904 905 if (rc == FALSE) { 906 return GetLastError()==ERROR_IO_INCOMPLETE; 907 } 908 909 return FALSE; 910 } 911 912 913 PJ_DEF(pj_status_t) pj_ioqueue_post_completion( pj_ioqueue_key_t *key, 914 pj_ioqueue_op_key_t *op_key, 915 pj_ssize_t bytes_status ) 916 { 917 BOOL rc; 918 919 rc = PostQueuedCompletionStatus(key->ioqueue->iocp, bytes_status, 920 (long)key, (OVERLAPPED*)op_key ); 921 if (rc == FALSE) { 922 return PJ_RETURN_OS_ERROR(GetLastError()); 923 } 924 925 return PJ_SUCCESS; 926 } 927
Note: See TracChangeset
for help on using the changeset viewer.