###################################################
################# GMsock v1.5.2c ##################
############### Made by Matthewbot ################
###################################################
#################Buffering bugfix##################
###################################################


-----------------New Bugfix-----------------------
- small fix in sock_connect
-----------------GMsock overview-------------------
GMsock is a GM DLL that let's you use windows sockets to communicate over the internet. Using sockets, you can do anything
from lookup something on a whois server, checking e-mail, to making a HTTP server, to making a true MMORPG. Sockets are very speedy, any slow-down while using sockets is in GM. GMsock v1.0 scripts do have a little overhead, because of a buffer that must be used to get data one character at a time. However, using sockets is still much faster than the mplay functions, but more complicated as well.

IMPORTANT: You must be have registered GM 5.2 or 5.3 to use GMsock. GM 5.0 will not work.
-------------What in the world is a socket?--------
A socket is a 2 way connection between 2 computers. Each computer has a certain number of ports, and
each port can be connected to a port on another computer. To use a socket, you must first create one.
You will need the IP address of another computer, and a port number to connect to. 
The other computer must also create a socket, but instruct it to "listen" for an incoming connection, 
instead of connecting to another computer. The computer listening is the server, and the computer 
connecting is the client. With sockets, GM can interface to almost anything. Here are some common port numbers:
(NOTE: a given server might not implement all of these service. Most only provide HTTP)

Port#|Abbr. |Description
  7  | ECHO |Echo's any data sent to it
20&21| FTP  |Used to transfer files
  23 |TELNET|Used for interactive telnet sessions
  25 | SMTP |Simple Mail Transfer Protocal
  37 | TIME |Network Time Protocal
  43 |WHOIS |Domain Name Ownership Lookup
  80 | HTTP |HTTP protocal(Web browser)
 110 | POP3 |POP3 E-mail
 156 | SQL  |SQL database server
 443 | HTTPS|Secure HTTP

  
-------------Adding GMsock to your game------------
to add GMsock to your game, place GMsock.dll either in a data file, or in the same directory of the game. Than, import
all the scripts contained in GMsock.gml. You now have all the sock_ functions added to your game.
-------------The sock_ functions-------------------
All of the sock_ functions have a comment in the begining that explain them. It's really not that complicated. There are several means to communicate:

raw-Directly reading and writing characters from the socket: sock_send & sock_recieve
token-Reading chunks of data(tokens) that are seperated by a special character. This approach works best with GM to server connections, because the server will understand the data: sock_token_send,sock_token_recieve
message-Sending messages similar to the the mplay_message functions. This is probably the simplest way to communicate GM to GM, but non-GMsock servers will not understand the message: sock_message_send,sock_message_recieve,sock_message_id,sock_message_value.
----------Synchronous vs Asynchronous--------------
Synchronous(blocking) means that if there is nothing to recieve on a socket, the game will hang until there is something
to recieve. Most likely, this is not what you want.
Asynchronous means that if there is nothing to recieve on a socket, it will not hang, instead, an empty string is returned. All the recieve scripts have a some specifics, pay special attention to sock_token_recieve. 
