update 2014-07-31

This commit is contained in:
parallelbgls
2014-07-31 17:08:48 +08:00
parent d98668c3c2
commit 1f760b6802
7 changed files with 631 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
namespace ModBus.Net
{
public class TCPProtocalLinker : ProtocalLinker
{
private static TCPSocket _socket;
public TCPProtocalLinker()
{
if (_socket == null)
{
_socket = new TCPSocket(ConfigurationManager.IP, int.Parse(ConfigurationManager.Port), false);
}
}
public override byte[] SendReceive(byte[] content)
{
return _socket.SendMsg(content);
}
public override bool SendOnly(byte[] content)
{
return _socket.SendMsgWithoutReturn(content);
}
}
}