Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
Client Class Reference

Client class. More...

#include <client.h>

Public Member Functions

 Client (const ClientSocket &sock)
 Construct a new Client object.
 
 ~Client ()
 Destroy the Client object.
 
void start ()
 Starts the client, blocking.
 
void close (const std::string &reason="")
 Stops the client.
 

Detailed Description

Client class.

Class that wraps around a socket and does all of the client handling.

Constructor & Destructor Documentation

◆ Client()

Client::Client ( const ClientSocket & sock)

Construct a new Client object.

Wraps around a client socket to handle it.

Parameters
sockthe socket to wrap around

Member Function Documentation

◆ close()

void Client::close ( const std::string & reason = "")

Stops the client.

Tells the client to exit on the next packet loop. Also, if in ClientState::LOGIN or ClientState::PLAY, sends a disconnect packet.

Parameters
reasonthe reason for closing the connection

The documentation for this class was generated from the following files: