开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: Error 509 - exception caught while reading socket - no such file or directory


 

开云体育

errno =2?

#define ENOENT?????????? 2????? /* No such file or directory */

Not sure why this error would be set, I don't see the code you've referenced below in my EPosixClientSocket.cpp - I'm using the version from twsapi, which is probably newer than your code.

On 15/07/15 19:17, souqmate@... [TWSAPI] wrote:
Spot on!  Or almost.  Here's the error handler from EposixClientSocket.cpp:
bool EPosixClientSocket::handleSocketError()
{
	// no error
	if( errno == 0)
		return true;

	// Socket is already connected
	if( errno == EISCONN) {
		return true;
	}

	if( errno == EWOULDBLOCK)
		return false;

	if( errno == ECONNREFUSED) {
		getWrapper()->error( NO_VALID_ID, CONNECT_FAIL.code(), CONNECT_FAIL.msg());
	}
	else {
		getWrapper()->error( NO_VALID_ID, SOCKET_EXCEPTION.code(),
			SOCKET_EXCEPTION.msg() + strerror(errno));
	}
	// reset errno
	errno = 0;
	eDisconnect();
	return false;
}

Now the variables are EISCONN=106, EWOULDBLOCK=11, ECONNREFUSED=111;
I have errno=2, which makes me jump to the end and call eDisconnect().
Question: what's errno=2 and why do I get it after 1.5 or even 3 years ? Has IB introduced it overnight? (Yet this socket communication depends only on TWS and API, i.e. independent of IB's servers).
I can't believe I'm the only person affected.   Thanks for your input!
SouqMate.

---In TWSAPI@...,  wrote :

 Check to see if your socket read() is returning EWOULDBLOCK error. This may be terminating your connection prematurely.

------------------------------------
Posted by: souqmate@...
------------------------------------


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    
    (Yahoo! ID required)

<*> To change settings via email:
    TWSAPI-digest@... 
    TWSAPI-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    TWSAPI-unsubscribe@...

<*> Your use of Yahoo Groups is subject to:
    




-- 
Stewart Douglas
sdouglas@...

Join [email protected] to automatically receive all group messages.