IP Server Question
TurnipTruck
Posts: 1,485
Greetings,
I am working on an Netlinx IP communication project.
In my code I am opening an IP server to listen for a client. The client is able to connect and send messages.
The problem that I am having is that when the client goes offline, it cannot reconnect to the server until the server is rebooted. Internal diagnostics indicate that the connection is closed when the client goes offline.
Must the server then be closed and re-opened?
Thanks.
I am working on an Netlinx IP communication project.
In my code I am opening an IP server to listen for a client. The client is able to connect and send messages.
The problem that I am having is that when the client goes offline, it cannot reconnect to the server until the server is rebooted. Internal diagnostics indicate that the connection is closed when the client goes offline.
Must the server then be closed and re-opened?
Thanks.
0
Comments
Closed no! Opened Yes, normally do a IP_SERVER_OPEN on the OFFLINE handler on the Data_Event of that Socket Server.
I ended up with 4 servers and an array in the data event. As any one server went offline and was re-opened, there was always another server (three more) availabel to the client.
In the Diagnostics for this program, the servers would just cycle through, 1,2,3,4,1,2,3,4 each one opening a connection then closing it and the next one openeing the conenction.
That is exactly what I ended up with. I don't know why it cycles though my three available servers, but it works now for the purpose intended.
Thanks.