07-17-2018 04:50 AM
Hi,
I'm trying to set up a webSocket client in my LabWindows project.
So far I tried 2 different ways.
The first was to include an external library (libWebSocket for example). So I've added the .lib file to the project ant the include file corresponding.
But In all the library I've found, the problem was always about files that are not installed on windows (like io.h, strings.h or fcntl.h for example).
And then I found that windows SDK offers a WebSocket library (http://zone.ni.com/reference/en-XX/help/370051AC-01/cvi/programmerref/calling_windows_sdk_functions/)
So I tried to use it in my project.
#include <windows.h> #include <websocket.h>
And it compiles. But when I declare my handler variable of type WEB_SOCKET_HANDLE, the compilation fail and it tells me :
error: unknown type name 'WEB_SOCKET_HANDLE'
So i'm kinda stuck, does anyone have faced the same issue and overcame it ?
07-25-2018 12:50 PM
Hi,
I've tried on my own with Full version and got several error as well. Iv'e tried to overcome some protype declaration but at the end I also got this error
Build Status (RotatedText.prj - Debug)
Link RotatedText_dbg.exe
error: Undefined symbol '_WebSocketCreateClientHandle@0' referenced in "c:\Users\Public\Documents\National Instruments\CVI2015\samples\userint\cvibuild.RotatedText\Debug\RotatedText.obj".
Build failed.
Paolo_P
Certified TestStand Architect
Certified LabVIEW Architect
National Instruments France
07-26-2018 03:04 AM - edited 07-26-2018 03:06 AM
Hi,
I created anoter topic a few days after this one asking about the differences between Full Development System and Base package and we came to talk about how to use web socket library.
Then I figure out I didin't know how to use it. So I moved to winhttp lib which allowed me to connect to my websocket server.
So far I didn't manage to get callback when the server notifies me for a change (I'm developping a websocket client as you might have guessed).
Maybe I have to use the websocket lib in addition to the winhttp lib to do what I want.
I enclose my test projet for those who might be interested