Giter Site home page Giter Site logo

baserver's People

Watchers

 avatar

baserver's Issues

刚刚看了下代码, 我觉得存在一点问题

因为代码中
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的源码。如何使用BAS进行文件传��
�?作者可否给个示例?
另:父线程、子线程各有什么作用?在代码中没看明白。刚��
�门,水平有限,请给予指点。不过也应该有一定的代表性吧

Original issue reported on code.google.com by [email protected] on 8 May 2012 at 11:28

example/proxy http代理不能正常工作

我的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

有点问题

已经下了最新版的,看了下源码,觉得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

关于baserver使用询问

大家好,我现在想实现一个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

这么好的项目,怎么没有更新了呢?

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

service_handler内存管理问题

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

service_handler_pool的实现大大的有问题

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

半同步/半异步的一个疑问

程序采用无锁设计,那么在业务逻辑层(也就是同步层),��
�何处理大量的连接?比如文件传输的时候,有100个连接正在�
��输文件,传输时肯定使用的是异步层,那么对应的在发方在
业务层应该有线程在读文件,然后写入BUFFER,收方在业务层��
�该有线程在读BUFFER,然后写入文件。如果采用无锁设计,同�
��层(业务逻辑层)需要开为每个连接开一个线程?如果开100
个线程,只是线程切换耗费的资源也会很大吧。
水平有限,请谅解。

Original issue reported on code.google.com by [email protected] on 30 Nov 2012 at 7:59

gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) 编译出错

将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

关于多播的设计问题

从一个数据源读取数据, 
然后推送给所有的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

basgateway

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

最大连接数

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

测试echo程序发现大量的time-wait连接,为什么

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

有点问题

已经下了最新版的,看了下源码,觉得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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.