unix sockets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unix sockets

Amin Mozaffarin
Hi,

I want to use unix sockets within octave.
Is there an example, how to specify the serverinfo struct in order to connect to a socket?
There only examples for AF_INET, not for AF_UNIX.

Thanks
Amin

--
Amin Mozaffarin
Kister Str. 8 | 97204 Höchberg
Mobil: 0162-9037852

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unix sockets

Mike Miller-4
On Tue, Jun 13, 2017 at 18:18:37 +0200, Amin Mozaffarin wrote:
> Hi,
>
> I want to use unix sockets within octave.
> Is there an example, how to specify the serverinfo struct in order to
> connect to a socket?
> There only examples for AF_INET, not for AF_UNIX.

Are you asking about the sockets package? It looks to me like the
sockets package only supports AF_INET sockets at the moment. The socket
function allows you to create an AF_UNIX socket, but the bind and
connect functions only understand host and port arguments relevant for
AF_INET.

If you are comfortable with the option of writing your own C++ function
for Octave, then you can create a socket any way you like using the
system libraries.

If you are willing to test the in-development Python interface, then the
Python socket library should work.

--
mike

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unix sockets

Amin Mozaffarin
Ok, thanks. 

Am 13.06.2017 7:44 nachm. schrieb "Mike Miller" <[hidden email]>:
On Tue, Jun 13, 2017 at 18:18:37 +0200, Amin Mozaffarin wrote:
> Hi,
>
> I want to use unix sockets within octave.
> Is there an example, how to specify the serverinfo struct in order to
> connect to a socket?
> There only examples for AF_INET, not for AF_UNIX.

Are you asking about the sockets package? It looks to me like the
sockets package only supports AF_INET sockets at the moment. The socket
function allows you to create an AF_UNIX socket, but the bind and
connect functions only understand host and port arguments relevant for
AF_INET.

If you are comfortable with the option of writing your own C++ function
for Octave, then you can create a socket any way you like using the
system libraries.

If you are willing to test the in-development Python interface, then the
Python socket library should work.

--
mike

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Loading...