Thursday 25 July 2013

Matlab Code for Client Server Communication

Server Configuration matlab code

data = 'Hai';
s = whos('data')
tcpipServer = tcpip('0.0.0.0',55000,'NetworkRole','Server');
set(tcpipServer,'OutputBufferSize',s.bytes);
fopen(tcpipServer);
fwrite(tcpipServer,data(:),'char');
fclose(tcpipServer);

Client Configuration matlab code

tcpipClient = tcpip('192.168.1.106',55000,'NetworkRole','Client')
set(tcpipClient,'InputBufferSize',7688);
fopen(tcpipClient);
rawData = fread(tcpipClient,961,'double');
fclose(tcpipClient);

Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...