i currently hav a program that reads a localPort to capture call data sent from a PBX. this is wht it looks like..

Code:
form_load
..
winsock1.protocol=sckTCPprotocol
Winsock1.LocalPort = 1200
Winsock1.Listen
..
end sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close

Winsock1.Accept requestID
DoEvents
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim sitem As String

Winsock1.GetData sitem

.. code to handle data
 
End Sub
now things have changed and call data is sent to a remote device that is connected to the PBX. hence i need to connect to a specific port on the remote device to read the data. i can see the data thru hyperterminal if i set the remote host and the port. but how can i modify the above program so that i can read the data from the remote machine.

just to make this clear.. this raw TCP..and does not involve issuing commands like telnet..

thanks