help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: open socket with listen() and still have command line available?


From: Paul Kienzle
Subject: Re: open socket with listen() and still have command line available?
Date: Sun, 27 May 2007 15:00:00 -0400


On May 27, 2007, at 11:49 AM, Tom Holroyd (NIH/NIMH) [E] wrote:

Hmm... that still leaves the send/recv function in parallel which will conflict with the posix socket interface.

Is there no way to implement namespaces?

Something like this needs to be done sometime.

pkg load socket
send(blah)
pkg load socket as skt
skt.send(blah)

We could get this sort of functionality with a new octave type 'module'. This would presumably be based on the octave symbol table class, with some overloads for function lookup. The constructor would take the module path as its parameter. The main work would be down by overloading subsref to access the module.name references.

The syntax would look something like:

  skt = module('socket')
  skt.send(blah)

The vtk bindings in octave already do something similar IIRC.

All of the code is already in Octave to handle this, but it will almost certainly need some refactoring in order to share rather than copy it.

        - Paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]