winlin

for #320, refine code.

@@ -1129,10 +1129,10 @@ void SrsRtmpConn::change_mw_sleep(int sleep_ms) @@ -1129,10 +1129,10 @@ void SrsRtmpConn::change_mw_sleep(int sleep_ms)
1129 1129
1130 void SrsRtmpConn::play_set_sock_options() 1130 void SrsRtmpConn::play_set_sock_options()
1131 { 1131 {
1132 - int fd = st_netfd_fileno(stfd);  
1133 -  
1134 #ifdef SRS_PERF_TCP_NODELAY 1132 #ifdef SRS_PERF_TCP_NODELAY
1135 if (true) { 1133 if (true) {
  1134 + int fd = st_netfd_fileno(stfd);
  1135 +
1136 socklen_t nb_v = sizeof(int); 1136 socklen_t nb_v = sizeof(int);
1137 1137
1138 int ov = 0; 1138 int ov = 0;
@@ -88,6 +88,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -88,6 +88,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
88 88
89 // generated by configure. 89 // generated by configure.
90 #include <srs_auto_headers.hpp> 90 #include <srs_auto_headers.hpp>
  91 +// important performance options.
  92 +#include <srs_core_performance.hpp>
91 93
92 // free the p and set to NULL. 94 // free the p and set to NULL.
93 // p must be a T*. 95 // p must be a T*.