src/network/core/os_abstraction.h
changeset 5975 af5c8ffc42e3
parent 5841 db7a27cf1f4d
child 5976 aa1cae2b975a
equal deleted inserted replaced
5974:5daa58eb1e0a 5975:af5c8ffc42e3
   151 	extern struct MsgPort     *TimerPort;
   151 	extern struct MsgPort     *TimerPort;
   152 	extern struct timerequest *TimerRequest;
   152 	extern struct timerequest *TimerRequest;
   153 #	endif
   153 #	endif
   154 #endif // __MORPHOS__ || __AMIGA__
   154 #endif // __MORPHOS__ || __AMIGA__
   155 
   155 
   156 static inline bool SetNonBlocking(const int d)
   156 static inline bool SetNonBlocking(SOCKET d)
   157 {
   157 {
   158 #ifdef WIN32
   158 #ifdef WIN32
   159 	u_long nonblocking = 1;
   159 	u_long nonblocking = 1;
   160 #else
   160 #else
   161 	int nonblocking = 1;
   161 	int nonblocking = 1;
   165 #else
   165 #else
   166 	return ioctlsocket(d, FIONBIO, &nonblocking) == 0;
   166 	return ioctlsocket(d, FIONBIO, &nonblocking) == 0;
   167 #endif
   167 #endif
   168 }
   168 }
   169 
   169 
   170 static inline bool SetNoDelay(const int d)
   170 static inline bool SetNoDelay(SOCKET d)
   171 {
   171 {
   172 	/* XXX should this be done at all? */
   172 	/* XXX should this be done at all? */
   173 #if !defined(BEOS_NET_SERVER) // not implemented on BeOS net_server
   173 #if !defined(BEOS_NET_SERVER) // not implemented on BeOS net_server
   174 	int b = 1;
   174 	int b = 1;
   175 	/* The (const char*) cast is needed for windows */
   175 	/* The (const char*) cast is needed for windows */