public async Task <int> SendMessageAsync(ModbusTcpAdu message)
 {
     return(await socket.SendAsync(new ArraySegment <byte>(message.GetBytes()), SocketFlags.None));
 }
 public int SendMessage(ModbusTcpAdu message)
 {
     return(socket.Send(message.GetBytes()));
 }