开发者

Sending structs through Unix domain sockets

I am u开发者_如何学运维sing Unix domain sockets to do some interprocess communication in Linux. Upon connection, the client sends a struct using send to the server. This struct contains some information about the client including an identifier string at the end. The server receives the info just find and sends another struct back. The client blocks with recv, but never gets anything. The server completes the send call without any errors and moves on.

Is there something fundamental that I am missing here? When I send strings across the socket both sides send and receive just fine. Does the data have to have a terminating NULL? That does not seem right...


When I came in the next day, I could not reproduce the error again.


Try flushing the socket on the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜