'''YMSG''' is the underlying Network_protocol used by the Y!M Instant_messaging client, for Yahoo!. Yahoo! Instant Messager supports many features beyond just messaging, including file transfer, chat, conferencing, voice chat, Webcams and Avatars. ==Technical Overview== The YMSG protocol communicates between the client application, and a server, using a TCP/IP connection on port 5050 by default. Other ports may be used if this port is blocked. Alternatively, a HTTP route is also available for clients behind a well secured firewall, with HTTP requests being used to upload messages from the client, while downloading all messages which have accumulated on the server since the last request. The client remains logged in for as long as the TCP/IP connection is kept open. Or, in the case of a client connected via HTTP, the client fails to send a request for some time (frequent 'Ping' messages are sent every thirty seconds or so). Messages consist of a twenty byte header, followed by a variable length table of key/value pairs, where the key is an ASCII represenation of a numberic code representing the field type, and the value is its associated data. A two byte separator, the Hexidecimal values c0 80, are used to delimit each entry in this table. Some parts of YMSG rely on other protocols. For example, file transfer is initially negotiated using YMSG, but the actual transfer of the file is done via HTTP. Webcams too use YMSG to discover and request permission to view a Webcam, but HTTP to actually feed the images from one client to another. ==Login== The login process for YMSG is quite complex. First the client introduces itself with a message containing its Username. The server responds with a rather long seed value, which looks like a mathematical equation. The client feeds this into a rather involved Algorithm, along with the account's Username and Password, to produce two response values looking like variable assignments which are sent to the server. If these values match the server's expectations, the client is admitted and sent data associated with that account (such as buddy/friends lists). Although the seed value looks like an equation, it is in reality little more than a series of instructions in which the Operands control lookups into a series of in-built tables, and the Operators determine which logic operation to perform. SHA1 is also used to create two Message_digest data arrays, which are then encoded using a table to resemble software variable assignments. ==See also== *Comparison_of_instant_messengers Category:Instant_messaging