Help! TCP Communications
Posted on 2005-05-10
I have a TCP Client, in one project, that connects to a specific IP address and port and "listens" for data. Now I need some kind of class or module, to run inside of another vb.net project, that will allow my TCP Client to connect to. Once the TCP client is connected, it waits until data is recieved from this yet to be determinded server class/module.
Does anybody have leads on such a TCP Server? Sample code or app? I need all the help I can get!!!
Thanks to a member of this forum, I was given this code that allows me to broadcast out a specific port, but it doesn't give my Client anything to connect to.
Public Class SendUpdateCommand
Public Sub Broadcast()
Dim sock As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)
sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1)
Dim iep As New IPEndPoint(Isloopback.Broadcast, 50089)
Dim msg As Byte() = Encoding.ASCII.GetBytes("Update")