1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine tcp client connect, extract to utility srs_socket_connect. 0.9.141

This commit is contained in:
winlin 2014-06-29 14:39:56 +08:00
parent 051c9e6268
commit 492665e166
7 changed files with 100 additions and 174 deletions

View file

@ -36,8 +36,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sys/resource.h>
#include <srs_app_st.hpp>
class SrsKbps;
// client open socket and connect to server.
extern int srs_socket_connect(std::string server, int port, int64_t timeout, st_netfd_t* pstfd);
/**
* convert level in string to log level in int.
* @return the log level defined in SrsLogLevel.