Core Function SSRead
From Sputnik Wiki
(Difference between revisions)
m (3 revisions) |
|||
Line 1: | Line 1: | ||
<pre> | <pre> | ||
− | SSRead( < | + | SSRead( <client/server>, <data type> ) |
</pre> | </pre> | ||
=== Description === | === Description === | ||
− | Read data from a | + | Read data from a client/server. |
=== Parameters === | === Parameters === | ||
− | ==== < | + | ==== <client/server> ==== |
− | The | + | The client or server object to read data from. |
==== <data-type> ==== | ==== <data-type> ==== | ||
Line 38: | Line 38: | ||
Success: Returns the data as requested. | Success: Returns the data as requested. | ||
− | Failure: Returns | + | Failure: Returns null. |
=== Remarks === | === Remarks === |
Latest revision as of 06:22, 15 June 2015
SSRead( <client/server>, <data type> )
Contents |
Description
Read data from a client/server.
Parameters
<client/server>
The client or server object to read data from.
<data-type>
The type of data to read from the message buffer valid options are:
[CODE] [TYPE] "v" Binary (Reads an Int32 for size then reads that many bytes) "V" Binary (Reads from current positoin to end of the buffer) "b" Byte (signed) "B" Byte (unsigned) "s" Int16 "i" Int32 "l" Int64 "S" UInt16 "I" UInt32 "L" UInt64 "f" Float "d" Double "p" String
Return Value
Success: Returns the data as requested.
Failure: Returns null.
Remarks
This is NOT a generic socket toolset; You can't use this to connect to anything instead it is used to connect Sputnik clients with Sputnik servers in a very easy to use way.
Example
See the Listen() and Connect() for examples