The winsock component will transmit an array of bytes.
An ASCII string is esentially an array of bytes, just treated differently in how you access it, so you can send an array of bytes to the socket in the format of an array of bytes, or a string.
A string in VB is actually stored as Unicode by VB in memory, but will be converted to an ASCII string (essentially an array of bytes) before it transmits it.
The mod function will give you the "remainder" after doing an Integer divide.
10 mod 256 is 10,
192 mod 256 is 192
256 mod 256 is 0
257 mod 256 is 1
513 mod 256 is 1
A byte (8 bits) will contain the value 0 to 255, so using mod 256 will give you the value of the Least Significant Byte (LSB) of a number.
Likewise, dividing by 256 will "shift" the bits in a number "to the right", or "towards the LSB" by 8 bits (i.e. 1 byte),
so you can access the value of specific bytes in a number by using various combinations of Mod, /, and "And mask", i.e. "And &HFF".
And pattrick these are actually some encryption routines by yahoo, so if you are making your own messenger instead of a chat client for yahoo then well you can use your own encryption routines, you don't need to use the same routine as yahoo for making an instant messenger.