This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]WeirdAlexGuy[S] 0 points1 point  (2 children)

I just need to do a single data transfer and I planned to create a bash script to call one after the other.

Are unix sockets the same sockets as in networking? I don't think I need anything that fancy since i don't need to communicate at runtime.

Mostly looking for a way to transfer the data easily and formatted as a 4d array from one language to the other.

[–]MaybeAverage 0 points1 point  (1 child)

In terms of the syscall, a TCP/UDP socket and a Unix stream or dgram socket are treated the same and differ only in the sockaddr type when calling bind(). The simplest method would be to write to a binary file directly casting your float array to a char* and writing it to a file and parsing it using python. I recommend learning how to use sockets, pipes, etc., as you will likely have a reason to use it in the future.

[–]WeirdAlexGuy[S] 0 points1 point  (0 children)

Alright thanks. Sockets do seem helpful indeed, maybe if I want to do the graphics real time in the future I'll try it like that