|
|
| AZ_RTTI (AssetProcessorConnection, "{C205009B-74EF-4C47-8623-917883756330}", SocketConnection) |
| |
| bool | Connect (const char *address, AZ::u16 port) override |
| | disconnects any current connection and starts to reconnect
|
| |
| bool | Disconnect (bool completeDisconnect=false) override |
| |
| bool | Listen (AZ::u16 port) override |
| | disconnects any current connection and starts to listen for a connection
|
| |
| EConnectionState | GetConnectionState () const override |
| | Get the current connection state.
|
| |
| bool | IsConnected () const override |
| |
| bool | IsDisconnected () const override |
| |
| bool | SendMsg (AZ::u32 typeId, const void *dataBuffer, AZ::u32 dataLength) override |
| | Send a message across the connection by message id.
|
| |
| bool | SendMsg (AZ::u32 typeId, AZ::u32 serial, const void *dataBuffer, AZ::u32 dataLength) override |
| | Send a message across the connection by message id.
|
| |
| bool | SendRequest (AZ::u32 typeId, const void *dataBuffer, AZ::u32 dataLength, TMessageCallback handler) override |
| | Send a message and wait for the response.
|
| |
| SocketConnection::TMessageCallbackHandle | AddMessageHandler (AZ::u32 typeId, TMessageCallback callback) override |
| |
| void | RemoveMessageHandler (AZ::u32 typeId, TMessageCallbackHandle callbackHandle) override |
| | Remove callback for specific typeId (allows multiple callbacks per id)
|
| |
| AZ::s32 | GetLastResult () const override |
| | Get the last socket result code from any socket call.
|
| |
| AZStd::string | GetLastErrorMessage () const override |
| | Get the last socket-related error from any socket call.
|
| |
|
bool | NegotiationFailed () |
| |
|
void | Configure (const char *branchToken, const char *platform, const char *identifier, const char *projectName) |
| |
|
| AZ_RTTI (SocketConnection, "{CF95282C-B514-4AB8-8C72-6063AD03725B}") |
| |
|
|
bool | NegotiateWithServer () |
| |
|
bool | NegotiateWithClient () |
| |
|
void | StartThread (ThreadState &thread) |
| |
|
void | JoinThread (ThreadState &thread, AZStd::condition_variable *wakeUpCondition=nullptr) |
| |
|
void | StartSendRecvThreads () |
| |
|
void | JoinSendRecvThreads () |
| |
|
void | SendThread () |
| |
|
void | RecvThread () |
| |
|
void | ConnectThread () |
| |
|
void | DisconnectThread () |
| |
|
void | ListenThread () |
| |
|
bool | SendRequest (AZ::u32 typeId, AZ::u32 serial, const void *dataBuffer, AZ::u32 dataLength, TMessageCallback handler) |
| |
|
void | QueueMessageForSend (AZ::u32 typeId, AZ::u32 serial, const void *dataBuffer, AZ::u32 dataLength) |
| |
|
void | InvokeMessageHandler (AZ::u32 typeId, AZ::u32 serial, const void *dataBuffer, AZ::u32 dataLength) |
| |
|
void | InvokeResponseHandler (AZ::u32 typeId, AZ::u32 serial, const void *dataBuffer, AZ::u32 dataLength) |
| |
|
void | AddResponseHandler (AZ::u32 typeId, AZ::u32 serial, SocketConnection::TMessageCallback callback) |
| |
|
void | RemoveResponseHandler (AZ::u32 typeId, AZ::u32 serial) |
| |
|
AZ::u32 | GetNextSerial () |
| |
|
SocketConnection::TMessageCallbackHandle | GetNewCallbackHandle () |
| |
|
void | DebugMessage (const char *format,...) |
| |
|
void | FlushResponseHandlers () |
| |
|
| enum class | EConnectionState {
Connected
, Connecting
, Disconnected
, Disconnecting
,
Listening
} |
| |
|
using | KeepAliveCallback = AZStd::function< void(bool)> |
| |
| using | TMessageCallback = AZStd::function< void(AZ::u32, AZ::u32, const void *, AZ::u32)> |
| |
|
typedef AZ::u32 | TMessageCallbackHandle |
| |
|
static SocketConnection * | GetInstance () |
| | Utility functions to get or set the one global instance of a SocketConnection.
|
| |
|
static void | SetInstance (SocketConnection *instance) |
| |
| static KeepAliveCallback | GetKeepAliveCallback () |
| |
|
static void | SetKeepAliveCallback (KeepAliveCallback callback) |
| |
|
static const TMessageCallbackHandle | s_invalidCallbackHandle = 0 |
| |
AssetProcessorConnection - an implementation of the SocketConnection interface using AzSocket It is primarily used for the AssetProcessor to connect to the game and stream files across the network