Hi Guys,

I have ran into a serious issue. inorder to resolve the issue i have to listen to a port 52445. I want to catch the incoming stream being getting hit on that particular port. Grab the data from that port and save into the database. If anyone has any idea please do tell me. Any Help would be gladly appreciated.

Edit :


Okay this is what i have found out so far. to initiate a connection i need a tcplistner at the server end but the server i am listening to is not under my control. it keeps on sending a stream at my end and i have to grab the data from it anyhow.

For now what i found out is something like this

'Server Side Code
Public client As New TcpClient()
Public Event connected()
Public locallistner As TcpListener


If locallistner Is Nothing Then
            locallistner = New TcpListener(5000)
End If
locallistner.Start()
client = locallistner.AcceptTcpClient()



'Client Side Code

client.Connect("192.168.0.69", 52445)
Dim strm As NetworkStream = client.GetStream()
Dim databuffer() As Byte = System.Text.Encoding.ASCII.GetBytes("TCP Connection Request")
strm.Write(databuffer, 0, databuffer.Length)
Dim inbuffer(client.ReceiveBufferSize) As Byte
strm.Read(inbuffer, 0, CInt(client.ReceiveBufferSize))
Dim indata As String = System.Text.Encoding.ASCII.GetString(inbuffer)
MsgBox("The Server Response was " & vbCrLf & indata)
client.Close()


Other than this i have found out about another way know as multicast from a blog.

http://aviadezra.blogspot.com/search/label/Communication

But both these methods made me realise one thing. i need to have access to the server which i cannot. If anyone know how do i go about it. please do assist. i am open to any advice.


Thanking You

Rohan Kondvilkar


  • Edited byHammerGuy Thursday, September 03, 2009 5:25 AMFound New Information
  •