mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Fixes for failure of connect() system call
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39862 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
be34f6dc07
commit
d60587e6bb
4 changed files with 73 additions and 43 deletions
|
@ -88,29 +88,22 @@ NSString * const NSStreamSOCKSProxyVersionKey
|
|||
*/
|
||||
static RunLoopEventType typeForStream(NSStream *aStream)
|
||||
{
|
||||
NSStreamStatus status = [aStream streamStatus];
|
||||
|
||||
if (NSStreamStatusError == status
|
||||
|| [aStream _loopID] == (void*)aStream)
|
||||
{
|
||||
return ET_TRIGGER;
|
||||
}
|
||||
#if defined(_WIN32)
|
||||
if ([aStream _loopID] == (void*)aStream)
|
||||
{
|
||||
return ET_TRIGGER;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ET_HANDLE;
|
||||
}
|
||||
return ET_HANDLE;
|
||||
#else
|
||||
if ([aStream _loopID] == (void*)aStream)
|
||||
{
|
||||
return ET_TRIGGER;
|
||||
}
|
||||
else if ([aStream isKindOfClass: [NSOutputStream class]] == NO
|
||||
&& [aStream streamStatus] != NSStreamStatusOpening)
|
||||
if ([aStream isKindOfClass: [NSOutputStream class]] == NO
|
||||
&& status != NSStreamStatusOpening)
|
||||
{
|
||||
return ET_RDESC;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ET_WDESC;
|
||||
}
|
||||
return ET_WDESC;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue