|
R-Type
R-Type project
|
Public Member Functions | |
| virtual bool | clientConnected ()=0 |
| Client is connected to the server. More... | |
| virtual void | clientConnect (const std::string &ip, int port)=0 |
| Connect the client to the server. More... | |
| virtual void | clientDisconnect ()=0 |
| Disconnect the client from the server. | |
| virtual void | clientSend (const std::shared_ptr< ArraySegment< byte >> &data)=0 |
| Send data to the server. More... | |
| virtual void | clientEarlyUpdate ()=0 |
| Client Update (call this function every frame) | |
| virtual void | serverStart (int port)=0 |
| Start the server and listen the port. More... | |
| virtual void | serverStop ()=0 |
| Stop the server. | |
| virtual void | serverSend (int connectionId, const std::shared_ptr< ArraySegment< byte >> &data)=0 |
| Send data to the client. More... | |
| virtual void | serverDisconnect (int connectionId)=0 |
| Disconnect the connection. More... | |
| virtual void | serverEarlyUpdate ()=0 |
| Server Update (call this function every frame) | |
Public Attributes | |
| Experimental::Action< void(Transport &)> | onClientConnected |
| Experimental::Action< void(Transport &)> | onClientDisconnected |
| Experimental::Action< void(Transport &, const std::shared_ptr< ArraySegment< byte >> &)> | onClientDataReceived |
| Experimental::Action< void(Transport &, const std::shared_ptr< ArraySegment< byte >> &)> | onClientDataSent |
| Experimental::Action< void(Transport &, int)> | onServerConnected |
| Experimental::Action< void(Transport &, int)> | onServerDisconnected |
| Experimental::Action< void(Transport &, int, const std::shared_ptr< ArraySegment< byte >> &)> | onServerDataReceived |
| Experimental::Action< void(Transport &, int, const std::shared_ptr< ArraySegment< byte >> &)> | onServerDataSent |
Static Public Attributes | |
| static std::shared_ptr< Transport > | activeTransport = nullptr |
|
pure virtual |
Connect the client to the server.
| ip | The ip of the server |
| port | The port of the server |
Implemented in KapMirror::TelepathyTransport, and KapMirror::SylphTransport.
|
pure virtual |
Client is connected to the server.
Implemented in KapMirror::TelepathyTransport, and KapMirror::SylphTransport.
|
pure virtual |
Send data to the server.
| data | The data to send |
Implemented in KapMirror::TelepathyTransport, and KapMirror::SylphTransport.
|
pure virtual |
Disconnect the connection.
| connectionId | The id of the connection |
Implemented in KapMirror::TelepathyTransport, and KapMirror::SylphTransport.
|
pure virtual |
Send data to the client.
| connectionId | The id of the connection |
| data | The data to send |
Implemented in KapMirror::TelepathyTransport, and KapMirror::SylphTransport.
|
pure virtual |
Start the server and listen the port.
| port | The port to listen |
Implemented in KapMirror::TelepathyTransport, and KapMirror::SylphTransport.