09-16-2009 04:07 PM
I've written socket clients and servers in Visual Studio / C++. However, now I'm trying to write them in LabWindows/CVI and having difficulty to get them going. I not finding too many indept starter guides / examples for creating a simple server and or simple client.
Does anybody know where to point me?
Thanks!
09-16-2009 08:19 PM
CVI ships with multiple example programs on datasocket. How you find them depends on what version of CVI you have.
In CVI 9.01, go to Help >> Find Examples, then click on the Search tab and enter DataSocket.
In CVI 6.0, go to Help >> Contents, then click on the Index tab, enter Example, then double-click on Example Programs on the left, then on the right, click on Communication, then DataSocket.
In either version, you can then scroll through the examples and see a description of each example.
09-17-2009 04:06 AM
when you say that you wrote clients and servers in visual studio, which library were you using ? if you were using the WinSock2 C API which is part of the Windows SDK, it is available with CVI provided you installed the Windows SDK. (if on the other hand you were using a wrapper like MFC socket classes, you are screwed).
CVI ships with its own TCP library which may seem a bit malformed for someone who has already used the standard socket calls: the CVI TCP library makes a big distinction between a client and a server socket, read and write calls are different for the 2 kind of sockets. this distinction always puzzled me and is not representative of the way a tcp connection works, so be prepared for a headache when you start using this library.