Code:
Dim ipaddress As New IPAddress(Convert.ToByte("localhost"))
Dim lister As New Net.Sockets.TcpListener(IPAddress, port.Text)
Dim mySocket As Socket = lister.AcceptSocket()
Public Sub StartServer()
Dim getstatus As Byte() = {&HFF, &HFF, &HFF, &HFF, &H0}
Dim getinfo As Byte() = {&HFF, &HFF, &HFF, &HFF, &HFF, &H0}
lister.Start()
mySocket.Receive(getstatus, 0, SocketFlags.None)
mySocket.Receive(getinfo, 0, SocketFlags.None)
log.Text = "Recieved packet of data from " & mySocket.AddressFamily.ToString()
While True
End While
End Sub
When I add that code(incomplete) it shows me an error:
An error occurred creating the form. See Exception.InnerException for details. The error is: Input string was not in a correct format.
What do to please? I can't start my form.