-
Jun 27th, 2014, 01:52 AM
#1
Thread Starter
Lively Member
[RESOLVED] listen to data incoming from a server
ok listen i want a form that has two textboxes one for ip one for port ... i want to be able to input a certain ip/port that i am connected to with another client on my pc and pull the data being sent to and from that connected ip port
i think i posted this right but i am not sure
say i am connecting to 1.1.1.1:12345 with a client so that is the server address mine would be 127.0.0.197:56213 or whatever i want to listen to the data being sent on this address using a winsock if possible how would i do this and pull the data ???
-
Jun 27th, 2014, 05:32 AM
#2
Re: listen to data incoming from a server
Originally Posted by josh230526
ok listen i want a form that has two textboxes one for ip one for port ... i want to be able to input a certain ip/port that i am connected to with another client on my pc and pull the data being sent to and from that connected ip port
i think i posted this right but i am not sure
say i am connecting to 1.1.1.1:12345 with a client so that is the server address mine would be 127.0.0.197:56213 or whatever i want to listen to the data being sent on this address using a winsock if possible how would i do this and pull the data ???
The control you're looking for is Winsock.
download this sample, and learn it: http://www.vb6.us/files/File/SimpleClientServer.zip
its a simple client-server chat (provided by Vb6.us)
-
Jun 27th, 2014, 06:59 AM
#3
Re: listen to data incoming from a server
I think this thread asks how to "tap into" a TCP connection using a Winsock control.
It can't be done, and it is hard to think of a legitimate purpose for it. Game cheat? Spyware?
As a debugging tool you'd want to use a TCP socket proxy technique or network sniffer or something.
-
Jun 27th, 2014, 02:38 PM
#4
Re: listen to data incoming from a server
If you download from the link posted by stum you can make two VB projects. Open up the project and completely delete Form2 from the project then save it as Client.vbp. Open up the project again and delete Form1 from the project and save it as Server.vbp
Now you have two vbp projects; a server and a client. Make sure you run the server first so it goes into the listen mode then start the client and connect to the server. Now you can start sending data back and forth from client to server and server to client.
If this is not what you want then I can only think you want to make something like a 'packet sniffer' which I believe there is at least one example in the code bank
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jun 27th, 2014, 08:26 PM
#5
Thread Starter
Lively Member
Re: listen to data incoming from a server
ok let me be more specific ill use a old chat client name and explain from there yahoo ok what im trying to do is like proxy it through my vb6 project have when i click connect on the chat client i want it to go to my vb proj then my proj relay the data to the server and yes winsock is the control i wish to use .... i use to have a yacsproxy example that did this when yahoo still worked now im trying to do this on another situation so click connect on the real client it then connects to my vb proj and my proj relays said data to the desired server i belive the example link was a kinda revers connection with client and server ...i want to do as i explained examples of this would be appreciated......im going to try to set a proxy in my vb6 proj and on the app and see if it works like that ...
-
Jun 28th, 2014, 03:16 AM
#6
Re: listen to data incoming from a server
This is not very complicated....
Client connects to proxy
Proxy allocates a 'client side' Winsock for this client
Proxy allocates a 'server side' Winsock for this client
Client sends request to proxy's 'client side' connection
Proxy connects to target server through the 'server side' port
Proxy forwards request from client to server
Proxy receives response from server
Proxy forwards response to client
Of course, you'll need to create some sort of Application Protocol between the client and proxy to ensure they both understand each other etc. but there are many examples littering the Net and I suspect in the Codebank here.
Last edited by Doogle; Jun 28th, 2014 at 03:44 AM.
Reason: Added a couple of steps
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
|