🤗 你好~ 我是 Mason,目前生活在杭州,热爱中国传统文化,崇尚技术的分而治之,根据应用场景采用相应的技术!15年以上物联网从业经验,担任过架构师、项目经理、技术主管。
🌈 极客、技术宅、全栈。研究过多种编程语言,深爱多范式混合编程和对象编程,有代码洁癖。喜欢探索新知识,乐于将自己开发的作品分享给开源社区,愿意和低调、诚实肯干的有识之士共同进步。
Automatically exported from code.google.com/p/baserver
🤗 你好~ 我是 Mason,目前生活在杭州,热爱中国传统文化,崇尚技术的分而治之,根据应用场景采用相应的技术!15年以上物联网从业经验,担任过架构师、项目经理、技术主管。
🌈 极客、技术宅、全栈。研究过多种编程语言,深爱多范式混合编程和对象编程,有代码洁癖。喜欢探索新知识,乐于将自己开发的作品分享给开源社区,愿意和低调、诚实肯干的有识之士共同进步。
最近在考虑网关的设计, 有没有采用bas实现gateway的smaple啊
Original issue reported on code.google.com by [email protected]
on 8 Jan 2010 at 1:59
[deleted issue]
已经下了最新版的,看了下源码,觉得service_handler.hpp里的
template<typename Buffers> void async_read(const Buffers& buffers);
与
template<typename Buffers> void async_write(const Buffers& buffers);
实现估计有点问题
直接用io_service().dispatch,而没有用strand.wrap来保证调用的顺序
,这样的话
如果一个包需要读两次,比如一个包头,一个包体,不知道��
�样会不会有问题
Original issue reported on code.google.com by [email protected]
on 18 Jun 2013 at 4:47
现在的porxy 用来实现 client-->porxy server-->server模型很容易。
请问如何实现 client->porxy<-client的情况.
2个客户端,他们都连接到porxy server
如何实现他们的数据转发,在现在这个框架上。
Original issue reported on code.google.com by [email protected]
on 21 Aug 2009 at 9:59
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Debian 3.4.4内核 及 Redhat 2.6.18-238.el5内核都是一样
Please provide any additional information below.
ulimit 和 sysctl都设置了,ulimit -a 查到能打开的文件数是
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 73728
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
但并发连接只能连981个左右,这是为什么?
Original issue reported on code.google.com by [email protected]
on 6 Aug 2012 at 4:11
[deleted issue]
[deleted issue]
[deleted issue]
因为代码中
server_handler中do_read, do_write会往worker thread
中post回调,而example中
是on_read中回调了async_write那么有中情况会出现问题,
就是读的包远小于写的
包。因为asio就是一次写还没回调,结果因为异步读调用了下�
��次的异步写,后一次
的异步写把前一次的没有完成的异步写,在asio buffer
中给覆盖了。 只是看的代
码,没有时间实践,有问题可以继续讨论,
您也可写一个case测试下
Original issue reported on code.google.com by [email protected]
on 5 Jul 2009 at 5:44
将bas作为我项目中的一部分,编译过程中提示错误信息如下��
�
../bas/service_handler.hpp:198: error: expected primary-expression before '>'
token
编译器:arm-none-linux-gnueabi-
是不是该编译器不支持bas中的语法
谢谢!
Original issue reported on code.google.com by [email protected]
on 22 Mar 2013 at 3:14
[deleted issue]
程序采用无锁设计,那么在业务逻辑层(也就是同步层),��
�何处理大量的连接?比如文件传输的时候,有100个连接正在�
��输文件,传输时肯定使用的是异步层,那么对应的在发方在
业务层应该有线程在读文件,然后写入BUFFER,收方在业务层��
�该有线程在读BUFFER,然后写入文件。如果采用无锁设计,同�
��层(业务逻辑层)需要开为每个连接开一个线程?如果开100
个线程,只是线程切换耗费的资源也会很大吧。
水平有限,请谅解。
Original issue reported on code.google.com by [email protected]
on 30 Nov 2012 at 7:59
[deleted issue]
大家好,我现在想实现一个http请求,然后将请求的出来结果�
��回给客户端,中间通过tomcat进行转接,现在有spserver(SPServe
r is a high concurrency server framework
library)和baserver两种可选,大家给比比优劣吧!我是刚进行��
�络编程的菜鸟,希望大家给说的详细点,谢谢!
spserver的介绍:
iunknown.iteye.com/blog/59804
code.google.com/p/spserver
Original issue reported on code.google.com by [email protected]
on 14 Mar 2012 at 3:21
[deleted issue]
[deleted issue]
我的boost版本:1.39.0
平台: linux-2.6
gcc: 3.4.5
./proxy 192.168.20.120 80 192.168.20.254 80 4 4 500 1024 0 5
然后我用浏览器访问http://192.168.20.120/test_100k.html,
仅能显示一小部分数
据,浏览器一直在等待后续数据.
test_100k.html是一个100k字节大小的html文件.
这是什么原因引起的?望能尽快给予解答为感.
Original issue reported on code.google.com by [email protected]
on 21 May 2009 at 3:44
vc7.1下编译失败。既然使用的是asio,应该考虑多个平台多种��
�译器
Original issue reported on code.google.com by [email protected]
on 28 Nov 2009 at 8:11
[deleted issue]
service_handler内存首先是通过service_handler_pool申请的,在有客户
端请求连接的时候从service_handler_pool中取出一个用于Accept,我
觉得会出现内存的泄漏,具体是这样的:Accept之后,马上会bi
nd一个读取,这时候如果我们想关闭这个连接即调用close,这�
��候由于读取事件没有发生,这个内存一直没有被正确的释放
,代码为:
/// Handle completion of an asynchronous accept operation.
void handle_accept(const boost::system::error_code& e,
service_handler_ptr handler)
{
if (!e)
{
// Start the first operation of the current handler.
handler->start();
handler->close(); // 传入读取事件之后马上要求关闭连接
// Accept new connection.
accept_one();
}
else
handler->close(e);
}
这时候可以发现service_handler并没有被释放,原因在于传入读��
�事件的时候参数是service_handler_ptr,也就是说在io_service没有��
�应读取事件之前是没有办法释放service_handler内存。
BAS代码中涉及service_handler的传递都是用shared_ptr,有一种击鼓�
��花的感觉,如果在这个过程中调用close(比如服务器想主动�
��闭一个客户端,或者这个链接超时)都不能正确的释放内存
刚看代码没几天,觉得很强大!这个issue可能是我使用或者理
解出错,不过值得讨论一下这种情况
Original issue reported on code.google.com by [email protected]
on 18 Oct 2011 at 6:59
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 24 Nov 2010 at 6:24
[deleted issue]
[deleted issue]
1、server.h里的get_service_handler调用没有进行同步,client.h里倒��
�有,不知道为啥认为server端不需要传入一个mutex.
2、get_service_handler里的实现也太简单了,if (service_handler.get()
==
0)就马上push_back,这样的话,如果运行个1年,我估计这个service
_handler_pool不断的增加直至内存耗尽.
作为服务端,进来1000个链接,中途随机退出500个链接,这个�
��很常见的场景,但是在这个service_handler_pool里却无法高效的�
��用这些已经退出去的链接,通常只是不断的new
handle,这样做太粗糙了,基本上没法用,因为我估计服务端连续
运行不到1个月,这个handlepool就会过度膨胀!。
Original issue reported on code.google.com by [email protected]
on 8 Aug 2011 at 2:25
最近一段时间一直在学习BAS的源码。如何使用BAS进行文件传��
�?作者可否给个示例?
另:父线程、子线程各有什么作用?在代码中没看明白。刚��
�门,水平有限,请给予指点。不过也应该有一定的代表性吧
Original issue reported on code.google.com by [email protected]
on 8 May 2012 at 11:28
[deleted issue]
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 8 Jan 2010 at 1:56
[deleted issue]
从一个数据源读取数据,
然后推送给所有的agent。这个在设计上靠bas现有的设计用
起来也有点难受,比如serverwork实现一个订阅数据的接口,然�
��得到数据,保存
on_open时候那个service_handler最后向其写数据。这个不符合我的�
��辑。我觉得
server这一级应该有保存connection和向其中的connection
send数据的能力
Original issue reported on code.google.com by [email protected]
on 3 Sep 2009 at 6:52
已经下了最新版的,看了下源码,觉得service_handler.hpp里的
template<typename Buffers> void async_read(const Buffers& buffers);
与
template<typename Buffers> void async_write(const Buffers& buffers);
实现估计有点问题
直接用io_service().dispatch,而没有用strand.wrap来保证调用的顺序
,这样的话
如果一个包需要读两次,比如一个包头,一个包体,不知道��
�样会不会有问题
Original issue reported on code.google.com by [email protected]
on 18 Jun 2013 at 4:48
1.我在使用你的ehco的测试例子,进行测试,发现client机子断��
�会出现大量的time-wait连接,知道端口全被占用,测试失败。
2.再使用你的echo例子测试proxy_server例子,client-proxy_server出现�
��量time-wait,proxy_server-echo_server也出现了大量time-wait,echo_serv
er机子正常。
3.将client例子改为on_write直接就close连接,则client-proxy_server的t
ime-wait消失。proxy_server-echo_server则依然存在。
问题,是不是bas里面的client在on_read里主动断开,会导致出现�
��机有time-wait连接
Original issue reported on code.google.com by [email protected]
on 8 Dec 2011 at 3:54
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.