ofxNetwork error in console (codeblocks windows)

The udpReceiver and udpSender examples build and run fine, I can see the drawing between both apps.

On the receiver app, I get this console message every frame:

OF_ERROR: 298 unknown error: 0 see errno.h for description of the error

I searched for errno.h on my computer and it was here:
C:\Program Files\CodeBlocks\MinGW\include

but there is no 298.

Any idea what this error is?

(Windows XP, Codeblocks)

Thanks

actually the errno is 0 not 298, 298 is the line in the file, but it shouldn’t be showing any message cause 0 is no error.

i’ve just fixed it in master

Hey Arturo

Will this version of the addon work with 0062?

https://github.com/openframeworks/openFrameworks/tree/master/addons/ofxNetwork/src

Or 007 only?

I don’t want to break my 0062 code. Perhaps you could tell me where you fixed the errno 0 in the code so I can just do to existing addon if not?

Thanks

To answer my own question, the version of ofxNetwork off github doesn’t work with 0062, I get these errors

C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h||In function ‘int ofxNetworkCheckErrno(const std::string&, const std::string&)’:expressionless:
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|26|error: ‘ECONNRESET’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|32|error: ‘ENOTCONN’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|35|error: ‘ENOTSOCK’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|38|error: ‘EOPNOTSUPP’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|41|error: ‘ETIMEDOUT’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|47|error: ‘ENOBUFS’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|53|error: ‘EADDRNOTAVAIL’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|56|error: ‘EAFNOSUPPORT’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|59|error: ‘EISCONN’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|62|error: ‘ECONNREFUSED’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|65|error: ‘ENETUNREACH’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|68|error: ‘EADDRINUSE’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|71|error: ‘EINPROGRESS’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|74|error: ‘EALREADY’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|77|error: ‘ENOPROTOOPT’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|80|error: ‘EPROTONOSUPPORT’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxNetworkUtils.h|92|error: ‘EMSGSIZE’ was not declared in this scope|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxTCPManager.cpp||In member function ‘bool ofxTCPManager::Accept(ofxTCPManager&)’:expressionless:
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxTCPManager.cpp|124|error: braces around scalar initializer for type ‘u_int’|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxTCPManager.cpp||In member function ‘int ofxTCPManager::SendAll(const char*, int)’:expressionless:
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxTCPManager.cpp|277|error: ‘ECONNRESET’ was not declared in this scope|
||=== Build finished: 19 errors, 0 warnings ===|

If I comment out the switch case within ofxNetworkCheckErrno i then get these errors…

C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxTCPManager.cpp||In member function ‘bool ofxTCPManager::Accept(ofxTCPManager&)’:expressionless:
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxTCPManager.cpp|124|error: braces around scalar initializer for type ‘u_int’|
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxTCPManager.cpp||In member function ‘int ofxTCPManager::SendAll(const char*, int)’:expressionless:
C:\openframeworks\v0.062\addons\ofxNetwork\src\ofxTCPManager.cpp|277|error: ‘ECONNRESET’ was not declared in this scope|
||=== Build finished: 2 errors, 0 warnings ===|

any thoughts?

ah forget me, the version for 007 works. my github version was a few days old. just changing ofThread to ofxThread works.

Hi, arturo and chrisoshea

I got a similar error with OF 0.9.0, windows10.

[ error ] ofxNetwork: ..¥..¥..¥addons¥ofxNetwork¥src¥ofxUDPManager.cpp: 336 unknown error: 10035 see errno.h for description of the error

This error appears only on release mode, when it received no data.

Any idea what this error is?

Thanks

there’s a couple of bugs in ofxNetwork in 0.9. they are fixed already in the nightly builds, can you try if that works for you?

I’ve tried latest verson of ofxNetwork from GitHub, and it works!!

Thanks!

I’m having a similar issue. Could you confirm if the Nightly build v20151109 is the one with the fix?