2014-08-01 update Change linker field

This commit is contained in:
parallelbgls
2014-08-01 14:02:44 +08:00
parent a6e06afb6d
commit 66f1d239f8

View File

@@ -6,16 +6,13 @@ namespace ModBus.Net
{ {
public class TcpProtocalLinker : ProtocalLinker public class TcpProtocalLinker : ProtocalLinker
{ {
private static TcpSocket _socket; private TcpSocket _socket;
public TcpProtocalLinker() public TcpProtocalLinker()
{
if (_socket == null)
{ {
_socket = new TcpSocket(ConfigurationManager.IP, int.Parse(ConfigurationManager.Port), false); _socket = new TcpSocket(ConfigurationManager.IP, int.Parse(ConfigurationManager.Port), false);
} }
}
public override byte[] SendReceive(byte[] content) public override byte[] SendReceive(byte[] content)
{ {