mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
extract simple socket to lib
This commit is contained in:
parent
5e4b7d3ae9
commit
f8335e2c1f
5 changed files with 77 additions and 18 deletions
|
@ -30,23 +30,7 @@ using namespace std;
|
|||
|
||||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_protocol_rtmp.hpp>
|
||||
|
||||
/**
|
||||
* the stream over epoll: never wait for data coming, that is async mode.
|
||||
*/
|
||||
class SimpleSocketStream
|
||||
{
|
||||
private:
|
||||
int sock;
|
||||
public:
|
||||
SimpleSocketStream(int fd){
|
||||
sock = fd;
|
||||
}
|
||||
virtual ~SimpleSocketStream() {
|
||||
::close(sock);
|
||||
}
|
||||
public:
|
||||
};
|
||||
#include <srs_lib_simple_socket.hpp>
|
||||
|
||||
/**
|
||||
* export runtime context.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue