establish connection from python to matlab -
i trying transfer data in real time python matlab using udp protocol (as post suggested: real-time data transfer python matlab).
right have, , dosent work:
on python (sender):
import socket my_socket= socket.socket() my_socket.connect(('127.0.0.1', 8821)) message='test1' in range(1,10): my_socket.send(message) print my_socket.close
on matlab (reciver):
u = udp('0.0.0.0','localport',8821); fopen(u); while(1) = fread(u,10); end fclose(u)
it dosent work, , errors get: python:
and matlab:
warning: unsuccessful read: specified amount of data not returned within timeout period.
any idieas?
it works me if tell socket
want udp connection:
my_socket= socket.socket(socket.af_inet, socket.sock_dgram)
Comments
Post a Comment