Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Communication with a java program using a networking port via openframeworks

$
0
0

@nathanblanchard12 wrote:

This is my code and for some reason it doesn't work.
Basically I'm using port 20 to send and receive messages but c++ is not getting it. I tested it using java and it worked fine. Why isn't this working.

void ofApp::setup()
{
udpConnection.Create();
udpConnection.Bind(20);
udpConnection.SetNonBlocking(true);
}

//--------------------------------------------------------------
void ofApp::update(){
char udpMessage[1000];
udpConnection.Receive(udpMessage, 20);
string message = udpMessage;
ofLog() << udpMessage;
}

Posts: 3

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles