socket disconnect shutdown reconnect error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

socket disconnect shutdown reconnect error

776 Views
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.

Tags (2)
0 Kudos
Reply
3 Replies

512 Views
maciejwdowiarz-
Contributor III

Hi,

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

0 Kudos
Reply

512 Views
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 Kudos
Reply

512 Views
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 Kudos
Reply