Hello,
I've two different computers, the first one in under windows and runs Scilab, the second is under linux and runs Octave.
I'ld like to make then working together so I was looking to use sockets.
On Scilab, it's quite simple :
SOCKET_init();
SOCKET_open(1,"192.168.1.75",9002); // IP of the linux computer and port
disp(SOCKET_query(1,"data?"); // asking for data value and getting answer from linux computer
SOCKET_close(1);
On Octave, a bit more complicated :
server = socket(AF_INET, SOCK_STREAM, 0)
rc = bind(server,port)
rc = listen(server,1)
server_data = accept(server)
# Receving incoming datas
[msg_s, len_s] = recv( server_data, 100 )
output=char(msg_s) # Here I'm getting the word data? from Scilab
# Responding by sending datas
rc = send( server_data, "1234" ) # Data is 1234
rc = disconnect( server_data )
rc = disconnect( server )
the problem is I can read all data from Scilab under Octave but Scilab do not receive any reply from Octave.