Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > Need a Tcp/IP explanation
 

Need a Tcp/IP explanation

onceagaini am another person looking for help with tcp/ip. iv looked around but nothing has reallyansweredmy questions.

  • why is sending onepieceif info to the client so complex?
  • is their a simple code that will send a small string to the client?
  • if not could someone post a code with a detailed explanation?
thank you for you time in advance
You_ssif  Tuesday, December 01, 2009 2:33 AM
why is sending one piece if info to the client so complex?
Because this shouldn't be done at a "tcp/ip" level. The lowest you would have to go is using a socket, but 99% of the time - it doesn't even need to take place this low. Using Pipes (http://msdn.microsoft.com/en-us/library/aa365780(VS.85).aspx) or Remoting Channels (http://msdn.microsoft.com/en-us/library/ms973857.aspx) is generally considered a more digestible, direct practice.

is their a simple code that will send a small string to the client?
Naturally, this depends on what you interpret as simple. If you enabled telnetting on both the client and server - you could simply execute a "net send 'some string'" message that displays in a modal dialog box on the receiving machine. However, this is horrifically insecure, and you'll have a hard (if not impossible) time trying to pry the message from the system and use it yourself.

if not could someone post a code with a detailed explanation?
Tell us the architecture you have in place... I get that you want to send a string to a remote PC, but we could use more details. For instance, do you have code running on that PC expecting/anticipating the message? Does it plan on responding? Is the communication large or something sensitive where you'd need to reorder what's been received and verify its checksum to ensure integrity? Is it happening on a LAN or is this being thrown into the internet cloud? I understand you want a quick, easy sample showing this, and that my responses, while not intentionally, are serving to fuel your frustration in all of this... But that's how programming works.

There's always a simple and direct solution for every descriptive and well-defined question. If the question starts to become more generic, one of two things happens with the solution...
1) It's concise but not thought out, sacrificing pertinent information regarding intended use and security warnings or
2) It's elaborate and dwelves into topics you not only could careless about, but may end up consufing you.
syntaxeater  Tuesday, December 01, 2009 3:04 AM
Here is my basic server code. All i want is my server to send a message to my client such as, my external ip or even something as simple as "hello client"

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        rserver = New TcpListener(3073)
        rserver.Start()
        rserver.AcceptTcpClient()

    End Sub

You_ssif  Tuesday, December 01, 2009 3:17 AM
I am trying to put together something as simplistic as I can - however, I'm currently enrolled as IPv6. As soon as I get back to a private network, if no one else has presented an quick easy 2 socket example; I'll get one for you.
syntaxeater  Tuesday, December 01, 2009 5:05 AM

You can use google to search for other answers

Custom Search

More Threads

• Deleting a file in FileSystemWatcher_Created event
• how to get directory value from openfiledialog
• text file creation contains strange chars at beginning of file
• Bug? DataGridViewRow seems bound to one DataGridView on one Form.
• MDI form option button Click event fired when form regains focus
• Setting of default value in the dropdownlist according to database value
• Resizing / Moving FormBorderStyle=none Form
• Close FullScreen on WMP
• VB2k5: Instantiate a textbox and assigning a text property
• get cursor text line