Google Answers Logo
View Question
 
Q: Reading a network stream using VB.NET ( No Answer,   2 Comments )
Question  
Subject: Reading a network stream using VB.NET
Category: Computers > Programming
Asked by: trice123-ga
List Price: $50.00
Posted: 03 Jun 2003 14:15 PDT
Expires: 03 Jul 2003 14:15 PDT
Question ID: 212619
I would like to be able to read (or peek) a network stream
communicating with a file on my computer.  In other words, to see
(display to a textbox or listbox) line-by-line the stream of
information that an offsite program sends to a local program via the
internet (ASCII, array reference, etc) that causes it to do what it is
supposed to do.  I don't want to interupt the stream, but allow
the local program to run unaltered.  I would like to be able to select
lines and copy to a listbox which will monitor future occurances of
those same character strings and raise events when those strings are
seen again in the stream.  Is this possible?  If so, how would I
program this in VB.NET?

Request for Question Clarification by mathtalk-ga on 06 Jun 2003 13:53 PDT
Hi, trice123-ga:

I think your question is an interesting one, but it would be difficult
to answer without a clearer definition of what platform is being used
(presumably some flavor of Windows since you mention VB.Net, but it
doesn't hurt to be specific) and what is meant by a "network stream".

Perhaps you have a TCP/IP network connection in mind, but there may be
more to it than that.  Is the local program receiving exclusively the
transmissions to a specific IP address and port?  If so then I can
perhaps answer the question by pointing you to some free tools that do
"socket redirection".

regards, mathtalk-ga

Clarification of Question by trice123-ga on 06 Jun 2003 16:35 PDT
Thanks for the reply.  I am using Windows XP.  The connection is
TCP/IP and the local program has a set port and I also have the offset
information and such.  As far as what I mean by networkstream, let's
say (for example sake) you are running a multiplayer game; the local
program relies on a stream of data to update the conditions of the
other players.  What I would like to do is read the incoming data
stream and display to a textbox without disrupting the interaction
between the offsite program and the local program.  Would a "socket
redirection" cause the local program to not run the way it should? 
Thanks (in advance) for your help.  Please let me know if you need
further clarification.

Request for Question Clarification by mathtalk-ga on 19 Jun 2003 15:14 PDT
Hi, trice123-ga:

I wonder if you've had a chance to peruse the links provided in the
Comments by rajivraj-ga, which mention the .Net framework classes
mainly responsible for socket manipulations.  If you are interested in
having a more detailed description of programming techniques in this
area, I'd appreciate hearing from you.  Otherwise I'll assume the
information given by rajivraj-ga was sufficient to get you started.

Thanks, mathtalk-ga
Answer  
There is no answer at this time.

Comments  
Subject: Re: Reading a network stream using VB.NET
From: rajivraj-ga on 09 Jun 2003 21:39 PDT
 
Hi trice123,

System.Net.Sockets is the namespace to look for and TcpListener is the
class.
This link has some code:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20478225.html
. Thatz C#. you can use http://www.kamalpatel.net/ to convert it to
vb.net! :)

Hope it helps.

Cheers!
Rajiv
Subject: Re: Reading a network stream using VB.NET
From: rajivraj-ga on 09 Jun 2003 21:42 PDT
 
One more.. http://www.dotnet247.com/247reference/System/Net/Sockets/TcpClient.aspx?v=2

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy