LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

datasocket server status

Hello all,
 
I am using datasocket for remote monitoring of application/test:
- test application starts local server
- test application posts data to server
- remote software retrieves data from server
 
When starting the server on an old slow computer, I get no errors but the application failed to connect a datasocket object to the server. I have a sequence of functions that all show no-error status. But most functions are only for the object and object status and not for the server status.
The same executable on a faster computer does never give this problem. Neither did running the applicationin in debug-mode. And inserting a few seconds delay between starting the local server and opening an object-connection does often solve this problem. So I am quite sure that the duration for starting the server is causing my troubles.
I do not know how much faster/slower/multitasking the next computer will be. So I do not want to insert a random long delay between starting the server and connecting the object.
 
Q: can I retrieve datasocket server status while there is yet no object-handle available ?
 
I am using the sequence:
Status = DS_ControlLocalServer(DSConst_ServerLaunch);
Status = DS_Open (UrlLocalBmp, DSConst_Write, DsWriteCallback, NULL, &(dshandle));
// for debugging
// DS_GetLastError (dshandle, &Status); //
// Status = DS_IsConnected(dshandle, &iConnect); // repeatedly for a few seconds
 
I always get Status zero for the function status.
The only indicator I get is iConnect that is zero. But I have already the experience that sometimes it takes a few seconds before this iConnect reports a connection. Never before needed I to close/open the object connection.
 
 
I am using
- Windows 2000 with SP4
- Labwindows/CVI 7.1
- Datasocket 4.3(0)
 
 
Kind regards, jos
 
 
 
 
0 Kudos
Message 1 of 2
(3,025 Views)
Try using DS_OpenEx instead of DS_Open and provide a nice timeout. DS_Open is asynchronous and returns without waiting for the connection to complete, but DS_OpenEx will wait if you pass a valid timeout.


0 Kudos
Message 2 of 2
(3,005 Views)