Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
lzpong committed Jul 18, 2018
1 parent 8277ef6 commit 7d72e41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ char on_socket_data(void* data, uv_stream_t* client, tw_peerAddr* pa, membuf_t*
free(uc);
free(gb);
}
else {
else
//linux 下,系统和源代码文件编码都是是utf8的,就不需要转换
printf("-------------------------------------------ws:len=%zd\n%s\n-------------------------------------------\n", buf->size, buf->data);
}
#endif // _MSC_VER
printf("-------------------------------------------ws:len=%zd\n%s\n-------------------------------------------\n", buf->size, buf->data);
ulong len = buf->size;
char* p = WebSocketMakeFrame(buf->data, &len, 1);//文本帧
tw_send_data(client, p, len, 0, 1);
Expand Down

0 comments on commit 7d72e41

Please sign in to comment.