Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Networking (https://www.askmehelpdesk.com/forumdisplay.php?f=76)
-   -   TCP/UDP client server (https://www.askmehelpdesk.com/showthread.php?t=328196)

  • Mar 12, 2009, 04:48 AM
    sindarela
    TCP/UDP client server
    Hello sir,

    I have a few questions to ask about TCP/UDP

    1)how to write in c++ program to show the communication using socket TCP for synchronous communication and UDP for asynchronous communication for the simple client server program.

    2) A simple application that uses RPC or RMI for the communication between a client to a server and a server to a server

    Client <--->Server1 <---> Server 2

    3) The invocation in server 1 to server 2 can have two types which are single thread and multithread.

    4) How to compare the processing time and turnaround time for the above applications.


    Thank you~:)
  • Mar 12, 2009, 05:31 AM
    Perito

    Your question is very involved - much too involved for a simple explanation here.

    There are many places to find complete programs to show communication like this. Here's one on CodeProject.

    CodeProject: Multi-threaded Client/Server Socket Class. Free source code and programming help

    There are many others on Code Project. Just search on "TCP UDP" or possibly on "sockets" or "winsock".

    SourceForge.net also has a number of programs, including source code, that do this type of thing.

    SourceForge.net: Open Source Software
  • Mar 12, 2009, 08:25 AM
    sindarela
    Thanks for the helping sir,

    Urm... how about d RMI or RCP?can u teach me how to write a simple application that uses RPC or RMI for the communication between a client to a server and a server to a server?
  • Mar 12, 2009, 08:33 AM
    Perito
    I'll confess that I've never used RMI at all.

    A couple of links for RPC (in C++):

    CodeProject: Introduction to RPC - Part 1. Free source code and programming help

    CodeProject: Introduction to RPC - Part 2. Free source code and programming help

    For RMI:

    CodeProject: RMI for C++. Free source code and programming help
  • Mar 13, 2009, 05:54 AM
    sindarela

    Thanks a lot sir for the information.. but I still have some problem to compare between communication server to server and comparison between communication time and turnaround?
  • Mar 13, 2009, 12:35 PM
    Perito
    I think that you're going to have to do some research to see which is the faster. You might have to do it empirically (write two applications and test to see which is faster).

  • All times are GMT -7. The time now is 01:20 AM.