mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine typo in app.
This commit is contained in:
parent
4d25520f99
commit
aac8a13f42
15 changed files with 1065 additions and 1962 deletions
|
@ -36,48 +36,32 @@
|
|||
|
||||
class SrsWallClock;
|
||||
|
||||
/**
|
||||
* the basic connection of SRS,
|
||||
* all connections accept from listener must extends from this base class,
|
||||
* server will add the connection to manager, and delete it when remove.
|
||||
*/
|
||||
// The basic connection of SRS,
|
||||
// all connections accept from listener must extends from this base class,
|
||||
// server will add the connection to manager, and delete it when remove.
|
||||
class SrsConnection : virtual public ISrsConnection, virtual public ISrsCoroutineHandler
|
||||
, virtual public ISrsKbpsDelta, virtual public ISrsReloadHandler
|
||||
{
|
||||
protected:
|
||||
/**
|
||||
* each connection start a green thread,
|
||||
* when thread stop, the connection will be delete by server.
|
||||
*/
|
||||
// Each connection start a green thread,
|
||||
// when thread stop, the connection will be delete by server.
|
||||
SrsCoroutine* trd;
|
||||
/**
|
||||
* the manager object to manage the connection.
|
||||
*/
|
||||
// The manager object to manage the connection.
|
||||
IConnectionManager* manager;
|
||||
/**
|
||||
* the underlayer st fd handler.
|
||||
*/
|
||||
// The underlayer st fd handler.
|
||||
srs_netfd_t stfd;
|
||||
/**
|
||||
* the ip of client.
|
||||
*/
|
||||
// The ip of client.
|
||||
std::string ip;
|
||||
/**
|
||||
* the underlayer socket.
|
||||
*/
|
||||
// The underlayer socket.
|
||||
SrsStSocket* skt;
|
||||
/**
|
||||
* connection total kbps.
|
||||
* not only the rtmp or http connection, all type of connection are
|
||||
* need to statistic the kbps of io.
|
||||
* the SrsStatistic will use it indirectly to statistic the bytes delta of current connection.
|
||||
*/
|
||||
// The connection total kbps.
|
||||
// not only the rtmp or http connection, all type of connection are
|
||||
// need to statistic the kbps of io.
|
||||
// The SrsStatistic will use it indirectly to statistic the bytes delta of current connection.
|
||||
SrsKbps* kbps;
|
||||
SrsWallClock* clk;
|
||||
/**
|
||||
* the create time in milliseconds.
|
||||
* for current connection to log self create time and calculate the living time.
|
||||
*/
|
||||
// The create time in milliseconds.
|
||||
// for current connection to log self create time and calculate the living time.
|
||||
int64_t create_time;
|
||||
public:
|
||||
SrsConnection(IConnectionManager* cm, srs_netfd_t c, std::string cip);
|
||||
|
@ -86,19 +70,15 @@ public:
|
|||
public:
|
||||
virtual void remark(int64_t* in, int64_t* out);
|
||||
public:
|
||||
/**
|
||||
* to dipose the connection.
|
||||
*/
|
||||
// To dipose the connection.
|
||||
virtual void dispose();
|
||||
/**
|
||||
* start the client green thread.
|
||||
* when server get a client from listener,
|
||||
* 1. server will create an concrete connection(for instance, RTMP connection),
|
||||
* 2. then add connection to its connection manager,
|
||||
* 3. start the client thread by invoke this start()
|
||||
* when client cycle thread stop, invoke the on_thread_stop(), which will use server
|
||||
* to remove the client by server->remove(this).
|
||||
*/
|
||||
// Start the client green thread.
|
||||
// when server get a client from listener,
|
||||
// 1. server will create an concrete connection(for instance, RTMP connection),
|
||||
// 2. then add connection to its connection manager,
|
||||
// 3. start the client thread by invoke this start()
|
||||
// when client cycle thread stop, invoke the on_thread_stop(), which will use server
|
||||
// To remove the client by server->remove(this).
|
||||
virtual srs_error_t start();
|
||||
// Set socket option TCP_NODELAY.
|
||||
virtual srs_error_t set_tcp_nodelay(bool v);
|
||||
|
@ -106,25 +86,17 @@ public:
|
|||
virtual srs_error_t set_socket_buffer(srs_utime_t buffer_v);
|
||||
// interface ISrsOneCycleThreadHandler
|
||||
public:
|
||||
/**
|
||||
* the thread cycle function,
|
||||
* when serve connection completed, terminate the loop which will terminate the thread,
|
||||
* thread will invoke the on_thread_stop() when it terminated.
|
||||
*/
|
||||
// The thread cycle function,
|
||||
// when serve connection completed, terminate the loop which will terminate the thread,
|
||||
// thread will invoke the on_thread_stop() when it terminated.
|
||||
virtual srs_error_t cycle();
|
||||
public:
|
||||
/**
|
||||
* get the srs id which identify the client.
|
||||
*/
|
||||
// Get the srs id which identify the client.
|
||||
virtual int srs_id();
|
||||
/**
|
||||
* set connection to expired.
|
||||
*/
|
||||
// Set connection to expired.
|
||||
virtual void expire();
|
||||
protected:
|
||||
/**
|
||||
* for concrete connection to do the cycle.
|
||||
*/
|
||||
// For concrete connection to do the cycle.
|
||||
virtual srs_error_t do_cycle() = 0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue