[nanomsg] Different behaviour between Linux and Windows

  • From: "^^" <2mailme@xxxxxxx>
  • To: <nanomsg@xxxxxxxxxxxxx>
  • Date: Tue, 24 Apr 2018 10:42:16 +0800

Dear Sir,

 

Sorry for disturbing you.

 

I have a problem which is confusing me.

 

I develop a program which has a producer, 2 workers, and a collector.

 

Producer read file and send raw binary data frame by frame to workers, workers 
process(just add header and rearrange line of raw data) and send it to 
collector.

 

1)       The pattern I used is PUSH – PULL:

producer works as server, push data;

workers work as client, pull data, after processing then push data to collector;

Collector works as server, pull data from workers.

 

First time, I deployed producer, workers and collector to a Linux server, I 
used different port to separate 2 workers, everything works good.

For testing purpose, I moved a worker to a Windows server,  then headache thing 
happens, the data processed by worker on windows is corrupted.

Then I closed the worker on Linux, only let the worker on Windows alive, all 
data received by collector is corrupt.

 

I tested multiple time, on Linux, no matter how many workers there are, the 
data outputted by collector is correct, but if data transferred to Windows then 
return, only first few bytes are correct, others are corrputed.

 

All nn_send and nn_recv use NN_MSG flag, and the data size is about 700KB. 
Linux and Windows worker’s source code is exactly same.

The nanomsg version both on Windows and Linux is 1.1.2

 

 

I am wondering is there differences between Linux and Windows message format or 
messaging mechanism?

Or just I missed something important.

If necessary, I will send you my code.

 

Hope to have your help.

 

Thank you.

 

Other related posts: