Protocols and Drivers

Started by ccarranco@ute.edu.ec at 01-30-2008 1:54 PM. Topic has 1 replies.

Print Search
Sort Posts:    
   01-30-2008, 1:54 PM
ccarranco@ute.edu.ec is not online. Last active: 1/31/2008 4:49:44 AM ccarranco@ute.edu.ec

Top 500 Posts
Joined on 01-31-2008
Posts 1
Can I communicate a PAC device whit a C# program throught sockets?
I have a c# program that is listening a specifc port (192.168.1.2:11000) and I need to send a string from de PAC device. I have a communication handle configurated (tcp:192.168.1.2:11000) and I am using the next code.
conexion = OpenOutgoingCommunication(socket);
transmision = TransmitString("hello word",socket);
desconexion = CloseCommunication(socket);
But the C# aplication doesn't recive de data correctly. It is like the aplication doesn`t know about the end of the message.
Please help me.
   Report 
   01-31-2008, 1:32 PM
rhernandez is not online. Last active: 11/12/2005 8:06:39 PM rhernandez

Top 10 Posts
Joined on 11-26-2003
Madrid - SPAIN
Posts 42
Re: Can I communicate a PAC device whit a C# program throught sockets?
Asuming the C# half is OK:
1. check the return codes (conexion, transmision), they may be giving you some diagnostic.
2. Wait a while before closing the socket, maybe you are not giving the PAC a chance to send the string. In fact do not close it at all, create a loop to keep sending packets for ever.
3. Sniff the tcp packets. Check this URL: http://www.wireshark.org/


Salu2.
   Report 
OptoForums » Product Forum » Protocols and D... » Can I communicate a PAC device whit a C# program throught sockets?

Powered by Community Server, by Telligent Systems