|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
32 #include <condition_variable>
40 #include <OgreUTFString.h>
111 void AddPacket(
int streamid,
int type,
int len,
const char *content);
141 bool SendNetMessage(
int type,
unsigned int streamid,
int len,
char* content);
144 void CouldNotConnect(std::string
const & msg,
bool close_socket =
true);
191 #endif // USE_SOCKETW
std::vector< RoRnet::UserInfo > GetUserInfos()
void PushNetMessage(MsgType type, std::string const &message)
RoRnet::ServerInfo m_server_settings
std::mutex m_recv_packetqueue_mutex
bool StartConnecting()
Launches connecting on background.
std::string UserAuthToStringShort(RoRnet::UserInfo const &user)
std::string m_status_message
void QueueStreamData(RoRnet::Header &header, char *buffer, size_t buffer_len)
std::vector< NetRecvPacket > GetIncomingStreamData()
char anim_name[CHARACTER_ANIM_NAME_LEN]
std::mutex m_userdata_mutex
bool GetAnyUserInfo(int uid, RoRnet::UserInfo &result)
Also considers local client.
bool GetUserInfo(int uid, RoRnet::UserInfo &result)
char buffer[RORNET_MAX_MESSAGE_LENGTH]
Ogre::UTFString GetUsername()
Ogre::String GetTerrainName()
std::atomic< int > m_net_quality
Ogre::UTFString m_username
void BroadcastChatMsg(const char *msg)
bool GetDisconnectedUserInfo(int uid, RoRnet::UserInfo &result)
#define RORNET_MAX_MESSAGE_LENGTH
maximum size of a RoR message. 8192 bytes = 8 kibibytes
bool SendNetMessage(int type, unsigned int streamid, int len, char *content)
std::atomic< bool > m_shutdown
void CouldNotConnect(std::string const &msg, bool close_socket=true)
MsgType
Global gameplay message loop, see struct Message in GameContext.h.
Central state/object manager and communications hub.
std::mutex m_send_packetqueue_mutex
RoRnet::UserInfo GetLocalUserData()
int ReceiveMessage(RoRnet::Header *head, char *content, int bufferlen)
std::thread m_recv_thread
RoRnet::UserInfo m_userdata
bool SendMessageRaw(char *buffer, int msgsize)
Ogre::ColourValue GetPlayerColor(int color_num)
std::vector< RoRnet::UserInfo > m_users
bool FindUserInfo(std::string const &username, RoRnet::UserInfo &result)
void SetNetQuality(int quality)
std::thread m_send_thread
std::vector< RoRnet::UserInfo > m_disconnected_users
std::vector< NetRecvPacket > m_recv_packet_buffer
char buffer[RORNET_MAX_MESSAGE_LENGTH]
std::string UserAuthToStringLong(RoRnet::UserInfo const &user)
std::condition_variable m_send_packet_available_cv
void AddLocalStream(RoRnet::StreamRegister *reg, int size)
#define CHARACTER_ANIM_NAME_LEN
void AddPacket(int streamid, int type, int len, const char *content)
std::deque< NetSendPacket > m_send_packet_buffer
std::thread m_connect_thread
void WhisperChatMsg(RoRnet::UserInfo const &user, const char *msg)
< Sent from the client to server and vice versa, to broadcast a new stream