Lines Matching defs:ioSocket
150 static OSErr MyBusyWait(SocketStruct *ioSocket,Boolean returnImmediatelyOnError,OTResult *outOTResult,Boolean *inAsyncOperationCompleteFlag);
156 static void InitSocket(SocketStruct *ioSocket);
158 static void PrepareForAsyncOperation(SocketStruct *ioSocket,const OTEventCode inExpectedCode);
379 static void InitSocket(SocketStruct *ioSocket)
381 ioSocket->mIsInUse = false;
383 ioSocket->mEndpointIsBound = false;
385 ioSocket->mLocalEndIsConnected = false;
386 ioSocket->mRemoteEndIsConnected = false;
388 ioSocket->mReceivedTOpenComplete = false;
389 ioSocket->mReceivedTBindComplete = false;
390 ioSocket->mReceivedTConnect = false;
391 ioSocket->mReceivedTListen = false;
392 ioSocket->mReceivedTPassCon = false;
393 ioSocket->mReceivedTDisconnect = false;
394 ioSocket->mReceivedTOrdRel = false;
395 ioSocket->mReceivedTDisconnectComplete = false;
397 ioSocket->mTimeoutTicks = 30 * 60;
398 ioSocket->mOperationStartTicks = -1;
400 ioSocket->mIdleWaitCallback = nil;
401 ioSocket->mUserRefPtr = nil;
403 ioSocket->mExpectedCode = 0;
404 ioSocket->mAsyncOperationResult = noErr;
406 ioSocket->mEndPointRef = kOTInvalidEndpointRef;
408 ioSocket->mBindRequestedAddrInfo = nil;
409 ioSocket->mAssignedAddrInfo = nil;
410 ioSocket->mRemoteAddrInfo = nil;
412 ioSocket->mReadyToReadData = false;
413 ioSocket->mReadyToWriteData = true;
415 ioSocket->mReadBuffer = nil;
416 ioSocket->mWriteBuffer = nil;
418 ioSocket->mLastError = noErr;
419 CopyCStrToCStr("",ioSocket->mErrMessage,sizeof(ioSocket->mErrMessage));
424 static void PrepareForAsyncOperation(SocketStruct *ioSocket,const OTEventCode inExpectedCode)
426 ioSocket->mOperationStartTicks = ::TickCount();
428 ioSocket->mAsyncOperationResult = noErr;
430 ioSocket->mExpectedCode = inExpectedCode;
436 static OSErr MyBusyWait(SocketStruct *ioSocket,Boolean returnImmediatelyOnError,OTResult *outOTResult,Boolean *inAsyncOperationCompleteFlag)
442 SetErrorMessageAndBailIfNil(ioSocket,"MyBusyWait: Bad parameter, ioSocket = nil");
449 theOTResult = ioSocket->mAsyncOperationResult;
454 if (ioSocket->mIdleWaitCallback != nil)
456 theOTResult = (*(ioSocket->mIdleWaitCallback))(ioSocket->mUserRefPtr);
464 if (TimeoutElapsed(ioSocket))