Simple client to server communication

Discussion in 'Site Programming, Development and Design' started by kwhite390, Oct 8, 2012.

  1. I need to set up simple client & server communication. Client would send a simple text message, server will receive and process and send back a reply text message.

    I need a recommendation on best way to do this. (Am using Visual Basic.Net 2008). I've looked at TCP, sockets, WCF.

    Simplest approach seems to be using the TCPListener and TCPClient classes. My concern is TCPListener (and other schemes) requires an IP address and port such as this example:

    // Set the TcpListener on port 13000.
    Int32 port = 13000;
    IPAddress localAddr = IPAddress.Parse("");

    // TcpListener server = new TcpListener(port);
    server = new TcpListener(localAddr, port);

    My understanding is that my domain does not have a unique IP address, it is shared with other domains.

    Is there a work around for this? And is there a defined port address that should be used? Are there other/better solutions for communication?

    I'm using Winhost Basic hosting plan.

    Last edited by a moderator: Oct 14, 2015
  2. WebRequest

    After doing some more research, I will try using WebRequest class for my communication since it uses the domain name instead of an IP address.

Share This Page