AngelScript
Loading...
Searching...
No Matches
socket object

Path: /sdk/add_on/scriptsocket/

The CScriptSocket provides an easy to use TCP socket for the scripts.

Note
Currently this add-on only works on Windows.

Public C++ interface

class CScriptSocket
{
public:
CScriptSocket();
// Memory management
void AddRef() const;
void Release() const;
// Methods
int Listen(asWORD port);
int Close();
CScriptSocket* Accept(asINT64 timeoutMicrosec = 0);
int Connect(asUINT ipv4Address, asWORD port);
int Send(const std::string& data);
std::string Receive(asINT64 timeoutMicrosec = 0);
bool IsActive() const;
};
unsigned int asUINT
32 bit unsigned integer
unsigned short asWORD
16 bit unsigned integer
__int64 asINT64
64 bit integer

Public script interface

See also
socket in the script language