socket disconnect shutdown reconnect error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

socket disconnect shutdown reconnect error

775 次查看
davidsa
Contributor I

When a socket is disconnected either through an error or by software, and the socket is shutdown

how do we reuse the same socket connection. "Reuse the socket address/memory"?

In Linux there is a setsockop(sockert, SOL_SOCKET, SO_REUSEADDR, opt,sizeof(opt))

What is the MQX equivalent for SO_REUSEADDR?

When trying to bind() to the same socket an error is returned.

标记 (2)
0 项奖励
回复
3 回复数

511 次查看
maciejwdowiarz-
Contributor III

Hi,

Have use found any solution in MQX 4.1 for socket reusage ?

0 项奖励
回复

511 次查看
davidsa
Contributor I

No this question was never answered and currently I have avoided this issue in my software

but will need to eventually addressed the potential problem.

David

0 项奖励
回复

511 次查看
maciejwdowiarz-
Contributor III

I'm porting Linux application into MQX and I'm experiencing shortage of socket options. SO_REUSEADDR is one of them.

I suppouse the only walkaround is to call shutdown() and later recreate new socket...

0 项奖励
回复