Hi everyone!
I am trying to send some data to an other computer on lan using homeseer scripts. I am trying to run the following simple script but it is not getting executed.
Imports System.Net
Imports System.Net.Sockets
Public Sub Main(ByVal sender As Object)
Dim tcpClient As New System.Net.Sockets.TcpClient()
tcpClient.Connect("127.0.0.1", 8000)
Dim networkStream As NetworkStream = tcpClient.GetStream()
If networkStream.CanWrite And networkStream.CanRead Then
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes("testing")
networkStream.Write(sendBytes, 0, sendBytes.Length)
Else
If Not networkStream.CanWrite Then
tcpClient.Close()
End If
End If
End Sub
The error messages on log are as follows
6/13/2007 11:56:39 AM - Error - Script compile error: Name 'Encoding' is not declared.on line 24
6/13/2007 11:56:39 AM - SCR - Option Strict OffImports System.NetImports System.Net.Socketsimports Schedulerimports SystemPublic Module scriptcode2#Region "Automatically generated code, do not modify"'Automatically generated code, do not modify'Event Sources Begin <system.contextstaticatt>
Pl. help me out. I am also unable to find ipmanager plugin in the updater.</system.contextstaticatt>
I am trying to send some data to an other computer on lan using homeseer scripts. I am trying to run the following simple script but it is not getting executed.
Imports System.Net
Imports System.Net.Sockets
Public Sub Main(ByVal sender As Object)
Dim tcpClient As New System.Net.Sockets.TcpClient()
tcpClient.Connect("127.0.0.1", 8000)
Dim networkStream As NetworkStream = tcpClient.GetStream()
If networkStream.CanWrite And networkStream.CanRead Then
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes("testing")
networkStream.Write(sendBytes, 0, sendBytes.Length)
Else
If Not networkStream.CanWrite Then
tcpClient.Close()
End If
End If
End Sub
The error messages on log are as follows
6/13/2007 11:56:39 AM - Error - Script compile error: Name 'Encoding' is not declared.on line 24
6/13/2007 11:56:39 AM - SCR - Option Strict OffImports System.NetImports System.Net.Socketsimports Schedulerimports SystemPublic Module scriptcode2#Region "Automatically generated code, do not modify"'Automatically generated code, do not modify'Event Sources Begin <system.contextstaticatt>
Pl. help me out. I am also unable to find ipmanager plugin in the updater.</system.contextstaticatt>
Comment