Hey Aaron,

yes, I think this code would block NOX. For non-blocking communication with
external processes, you should do one of the following:

a) use Twisted: you'll have to implement an interface for communication with
twisted in your module and your external app. This might be easier if your
external app is also in python. I did this a while back and can provide you
with some reference code. But there's also plenty examples online.
b) use the 'messenger' component: send your message from your external app
to the messenger's socket (this won't block) and have the messenger dispatch
it to your component. For reference, the GUI in the destiny branch is using
the messenger (or specifically 'jsonmessenger') to communicate with NOX

On Sun, Mar 27, 2011 at 5:01 PM, Aaron Rosen <[email protected]> wrote:

> Hello,
>
> I'm trying to get some threading working in a nox module but I've read on
> the mailing list that the python threading does not work well due to the
> global locking (and thats what I'm seeing to.. ). Anyways I was wondering If
> there is any reason why this short module wouldn't work?
>
> I've connected my openflow software switch to have a dpid of 1 with
> --datapath-id=0000000000000001
>
> Though when I send command over a socket to this module I'm getting
>
> 00037|nox|ERR:no datapath with id 000000000001 registered at nox
>
> Since this code is all in a while loop could that be causing the OF switch
> not to connect?
>
>
> Here is my code:
>
> http://pastebin.com/7WVNADwy
>
> Thanks!
>
> Aaron
>
>
>
> --
> Aaron O. Rosen
> Masters Student - Network Communication
> 306B Fluor Daniel
> 843.425.9777
>
>
> _______________________________________________
> nox-dev mailing list
> [email protected]
> http://noxrepo.org/mailman/listinfo/nox-dev
>
>
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to