Skip to content

Commit

Permalink
修改一个bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dosgo committed Apr 20, 2016
1 parent 291dec5 commit dea64dd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Binary file modified bin/Debug/ngrokc.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#include "nonblocking.h"

using namespace std;
string VER = "1.23-(2016/4/20)";
string VER = "1.24-(2016/4/20)";

char s_name[255]="ngrokd.ngrok.com";
int s_port= 443;
Expand Down
6 changes: 3 additions & 3 deletions ngrok-c.depend
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@

1461071288 d:\c\ngrok-c\cjson.h

1461071371 source:d:\c\ngrok-c\main.cpp
1461157340 source:d:\c\ngrok-c\main.cpp
"config.h"
<string.h>
<stdio.h>
Expand Down Expand Up @@ -549,7 +549,7 @@

1461071288 d:\c\ngrok-c\bytestool.h

1461071289 d:\c\ngrok-c\nonblocking.h
1461161062 d:\c\ngrok-c\nonblocking.h
"config.h"
<string.h>
<winsock.h>
Expand Down Expand Up @@ -830,7 +830,7 @@
"mytime.h"
"sslbio.h"

1461071449 source:d:\c\ngrok-c\ngrok.cpp
1461160662 source:d:\c\ngrok-c\ngrok.cpp
"config.h"
<string>
<windows.h>
Expand Down
4 changes: 2 additions & 2 deletions ngrok.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int RemoteSslInit(map<int, sockinfo*>::iterator *it1,sockinfo *tempinfo,string &

int LocalToRemote(map<int, sockinfo*>::iterator *it1,sockinfo *tempinfo,ssl_info *sslinfo,map<int,sockinfo*>*socklist){
int readlen;
int bufsize=1024*15;//15K //oolarssl SSL_MAX_CONTENT_LEN 16384
int bufsize=1024*10;//15K //oolarssl SSL_MAX_CONTENT_LEN 16384
//oolarssl 最大发送长度不能超过16K。。还是改成15吧
char buf[bufsize+1];
memset(buf,0,bufsize+1);
Expand Down Expand Up @@ -129,7 +129,7 @@ int LocalToRemote(map<int, sockinfo*>::iterator *it1,sockinfo *tempinfo,ssl_info

int RemoteToLocal(ssl_info *sslinfo1,sockinfo *tempinfo1,map<int, sockinfo*>::iterator *it1,map<int,sockinfo*>*socklist){
int readlen,sendlen;
int bufsize=1024*15;//15K //oolarssl SSL_MAX_CONTENT_LEN 16384
int bufsize=1024*10;//15K //oolarssl SSL_MAX_CONTENT_LEN 16384
//oolarssl 最大发送长度不能超过16K。。还是改成15吧
char buf[bufsize+1];
memset(buf,0,bufsize+1);
Expand Down
4 changes: 2 additions & 2 deletions nonblocking.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ inline int SetBufSize(int sock)
//接收缓冲区
int opt=25*1024;//30K
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (const char*)&opt,sizeof(opt));
//发送缓冲区
setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (const char*)&opt,sizeof(opt));
//发送缓冲区 (这个千万不要。。发送不需要缓存区)
// setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (const char*)&opt,sizeof(opt));
return 0;
}

Expand Down

0 comments on commit dea64dd

Please sign in to comment.