OscP5 netP5 UdpServer blocking port on osx mavericks

edited September 2014 in Library Questions


I'm trying to create a minimal UDP server to pass some strings around but ran into issues on OSX Mavericks.

My server is as simple as this:

    import netP5.UdpServer;
    UdpServer server;

    void setup(){
      server = new UdpServer(this, 10001);
    void draw(){}
    void mouseReleased(){
      server.send(("test: frame_"+frameCount).getBytes());

and I'm using the Python socket example as a receiver:

    import socket

    sock = socket.socket(socket.AF_INET, # Internet
                         socket.SOCK_DGRAM) # UDP
    sock.bind(("", 10001))
    while True:
      data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
      print "received message:", data

This works as expected on Windows, but not on OSX Mavericks. Regardless of which application I start first (the server or the client), they seem to be blocking each other. Is there a way to create a non blocking Udp Server with netP5 ? How can I get past this issue ?


Sign In or Register to comment.