转自:http://www.cnblogs.com/futuredo/archive/2012/10/19/2727204.html Constructing and matching binaries Erlang/OTP R15B02 In R12B, the most natural way to write binary construction and matching is now significantly faster than in earlier releases. 在R12
最近使用gSoap传输二进制数据,遇到问题.gSoap不能一次传输二进制数据.所以使用分包传送. struct xsd_DwgInfo { ];//分包大小 int m_nReadSize;// bool m_bEof;//此次是否完全读取数据 }; int ns_GetDwgBinaryInfo(char* chMineID, int nPosition, struct xsd_DwgInfo& dwgInfo); 服务器端代码: #include <fstream> using s
erlang二进制数据在内存中有两种存在形式,当数据大小不到 64 bytes,就直接存在进程堆内.假设超过了64 bytes.就被保存到进程外的共享堆里,能够给节点内全部进程共享. erlang有两种二进制容器:heap binaries和refc binaries. heap binaries Heap binaries are small binaries, up to 64 bytes, that are stored directly on the process heap. They