|
Answer» Hi all,
I know i know the basic concept of PORT. May anybody tell me how can it be viewed programatically.simple TCP/IP socket workflow programatically, here is how i am going to do it, putting into simple words:
Client: 1. create a socket and connect to server ip address at predefined port: eg. 192.168.1.1:8888 (LAN IP) 2. connection approved, ok, start HANDSHAKE process, client send "my NAME is client" 3. define your own protocol for sending/receiving packet
Server: 1. create a socket listening at certain port, eg. 8888 2. on event listener, hey, there is a client connection request, ok, so create a new socket for the connection. 3. Handshake protocol between client and server, server send "my name is server, who are you?" 4. define your own protocol for sending/receiving packet
on multiple client tcp/ip, server have to keep a list of connected client(s), and you should define you own protocol for broadcasting packet, and redirecting packet to certain client, so the diagram would look like this:
ClientC ^ | | Y ClientB<--------> SERVER <---------> ClientA
ps: this is homework right? **pssttt, just between you and me, the only subject i've ever failed is networking.This is way offtopic for this section of the forum. It belongs in "Networking".
Apratim Gupta, please STUDY the sections AVAILABLE before posting.
|