does anyone have an example of a c++ TCP/IP client that works with labview TCP?IP server ?? 
Author Message
 does anyone have an example of a c++ TCP/IP client that works with labview TCP?IP server ??

I have the labview TCP/IP client/server working fine, but now I need
to do this were labview is the TCP/IP server and the c++ program is
the client. Does anybody have a simple C++ TCP/IP client that works
with labview TCP/IP server ????


Sun, 29 Feb 2004 04:57:14 GMT  
 does anyone have an example of a c++ TCP/IP client that works with labview TCP?IP server ??
I haven't done it with c++ but I once wrote a LabWindows/CVI client
program that connected to either a LabVIEW or Visual Basic server and
the CVI program didn't care which server was running. I just specified
the port and host name. I would imagine that the c++ method is similar
and if your development system has any TCP client examples, it should
work with any TCP server.


Sun, 29 Feb 2004 06:06:38 GMT  
 does anyone have an example of a c++ TCP/IP client that works with labview TCP?IP server ??
Hi there,

Because TCP/IP is a protocol it doesn't matter if you write the client
in C++ or the server in LabVIEW (or vice verse) because they speak
"the same language". What you need in c++ is to create a TCP socket (a
socket is the IP-adress and port together e.g. IP-address 192.168.0.1
port 34 is a TCP socket 192.168.0.1.34) and there a many examples of
this available.

However you could run into problem when trying to intepret the
transmitted data. For example, if you try to pass a U32 to the server,
the U32 is transformed into four bytes. You have to beware of the
endian use. I've runned into problems where the C++ uses a big endian
and LabVIEW uses little endian (or was it vice verse? Don't
remember!). In LabVIEW "flatten into string", "unflatten from string"
and "reverse string" VIs is very useful together with the usual TCP
VIs. All you really have to do is to reverse the byte order for each
numeric type before transmitting to the server.



Sun, 29 Feb 2004 15:37:33 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. tcl tcp client/server worked example

2. Having tcl interact with a TCP/IP interface

3. C5 - TCP/IP Client/Server and DirectX Questions

4. TCP/IP server & client in CW2xxxx

5. Interest in TCP/Ip Server & Client

6. Client - Server slow tcp/ip...

7. TCP/IP sockets code in REXX script (long) - client.CMD (1/1)

8. TCP/IP sockets code in REXX script (long) - client.CMD (0/1)

9. CLIENT (Windows 3.1 or 95 or NT) to MVS-CICS via TCP/IP or other gateway

10. TCP/IP client app with MF COBOL?

11. Need help with TCP/IP client access from Windows

12. TCP IP, client and server socket

 

 
Powered by phpBB® Forum Software