net.Receive
Description
Adds a net message handler. Only one receiver can be used to receive the net message.
You can use the net.Read*
functions within the message handler callback.
The message-name is converted to lower-case so the message-names "
BigBlue
" and "bigblue
" would be equal.You should put this function outside of any other function or hook for it to work properly unless you know what you are doing!
You must read information in the same order as you write it.
Each net message has a length limit of 64KB!
Arguments
Example
An example with receiving message clientside, when sent from the server.
Output: ] send_message test
Message from server received. Its length is 56.
The message was: test
The cool number was: 1337
Example
An example with receiving message serverside, when sent from a client.
Output: ] send_message_to_server test
Message from Rubat received. Its length is 56.
The message was: test
The cool number was: 1337