|
-
Apr 19th, 2001, 05:05 AM
#1
Thread Starter
New Member
Hi All,
Anyone, please please help.......
The scenario :
1)The host/remote side have their own application to transmit and receive data.
2) I have a PC at my site, my PC have to send some message to host thru TCP/IP .
Question:
I understand that winsock have to have both server and client install in oder for them to connect. But i can't install any application at their side,
So, is that a way for me to connect in VB without install any application at their side? How to detect the data arrive? And how to sent out the data from my application?
What is the thing that i need to take into consideration in order for me to connect to host?
Thanks ..
-
Apr 19th, 2001, 05:31 AM
#2
Retired VBF Adm1nistrator
To make a TCP conneciton there must be something listening on a tcp port on the remote side, and something willing to connect from the client.
So if you were to connect your mail client to the ftp port of a server, you would have a TCP connection.
So all you have to do is connect and send the required data ...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Apr 20th, 2001, 01:25 AM
#3
Thread Starter
New Member
But my problem is i don't even know what to use in order to connect, may be winsock, mscomm.....
-
Apr 20th, 2001, 01:56 AM
#4
Retired VBF Adm1nistrator
You would use a winsock control.
Personally I use the microsoft winsock control.
You can use it by going,
Project > Components > Microsoft Winsock Control
Then stick it on your form.
Give it a remotehost + remoteport property.
Then to make it connect, you just do :
All of the events for the winsock control are pretty straightforward.
And to grab data coming into the winsock control you'd do something like this :
Code:
Dim strString As String
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Winsock1.GetData strString, vbString
'strString now contains the data that came in
End Sub
That help clear things up ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|