Commit bd623ef7 authored by wx002's avatar wx002

finish irc research

parent 1576d2b7
The Internet Chat Rely Protocol
This is the simple basic chat protocol, which serves as the foundation of modern messaging applications. It consist of a client/server model architecture. One of its nice feature is that the protocol is complete text based, which means that the client is just any socket program that is capable of connecting to a server.
The server forms the entire backbone of IRC, which consist of multiple servers, where clients on any server could talk to anyone else connect to any of the servers, which forms an entire IRC network. Each server consider to be a node for anyone else on the net to see.
The client is anything but a server, consist of a unique nickname. The client consist of the following info keeping track by servers:
- unique nickname (max 9 char long)
- real name of host that is running
- username on the client
- which server is the client connected to
The IRC consist of different types of users, a special one is the operators. This is a special type of client which have special permission to maintain the server. Operators are allow to connect/disconnect servers as a way to ensure no bad connection and to prevent long time routing. Operators also allow to remove any users from server by force, function similar to the role of moderator on modern chat platforms.
After joining an IRC server, users are placed into channels. Channel is a named group consist of many clients, all users within a channel can see all messages coming across. The channel will be implicitly created when a user joins, and remove once the last user leave the channel. A special user(s) known as channel operator act as the owner of the channel, capable of invite and kick users, serve similar to moderator.
There is no specified character set for messages. The protocol is only based on 8 bit codec, which can consist of any number them. Some are act as delimiters. Delimiters and
keyword commands are mostly usable with ASCII terminal and telnet connection.
Messages exchange is not always guaranteed for client/server. When client sends a command to server, it is expected to obtain a respond, but should not wait indefinitely for one. The communication is consider to be async in nature. The message consist of three parts:
- Prefix (optional)
- Command
- Command argument
Argument should be separated by ASCII delimiter. The prefix is used to keep track of the origin of the message.
IRC supports various types of communications.
- One-to-One: Messages directly from one client to another client routed by server(s)
- One-to-Many: Messages shared via a channel or across multiple channels for many users
- To a list: Message sent directly a list of specified clients (not efficient)
- To a Group: Message to a channel, consist of the clients within that channel
- One-to-All: Broadcast messages to all clients and servers
- Server-to-Server: message exchange between servers similar to client
The IRC consist of a registration process, consist of various commands.
- PASS: set the connection password
- NICK: register the nickname
- USER: The message to specify the initial connection
PASS <password>
NICK <nickname>
USER <username> <hostname> <servername> <realname>
IRC Ping-Pong Authentication/Test
The PING server command will be sent to client to test connection. It will send PING follow by a string, and the receiver is expected to reply with a PONG message with that exact string by set time. Failure to do so would result server closing the connection.
- Although it is useful to be able to have many servers connecting together and able to communicate, it is not efficient when the IRC network gets too long, where routing messages for clients within different server would result significant delay.
- The no standard character set for servers result confusion between server-to-server communication since everyone could potentially have their own rules while exchanging messages
- Registration with only NICK as ID would have a problem due to limitation and user base with modern platform
- Almost zero level of security make it easy for attackers to steal user ID and spoof messages
- The async nature of communication make it unreliable with communication since there is no indication of packet lose when response are not received
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment