Projects tagged ‘framework’, ‘server’, and ‘tcp’


Jump to tag:

Projects tagged ‘framework’, ‘server’, and ‘tcp’

Filtered by Project Tags framework server tcp

Refine results Project Tags udp (8) socket (6) java (5) library (4) client (4) asynchronous (4) network (4) communication (4) nio (3) tcpip (2) event-driven (2) sockets (2)

[12 total ]

11 Users

The Netty project is an effort to provide an asynchronous event-driven network application framework and tools for rapid development of maintainable high performance and high scalability protocol ... [More] servers and clients. In other words, Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server. [Less]
Created about 1 year ago.

1 Users
 

Extasys is a fast, accurate and easy to use TCP/UDP socket library for Java, Mono and Microsoft .NET Framework. The power of this socket is the asynchronous data proccessing that offers. If you are ... [More] using sockets then Extasys is the proper tool for your work because we designed this socket to help you to only have to think about the message exchange (the process) and let it do the hard job. News We decided to include IKVM.NET binaries in Extasys for .NET 2.0.0.7 after a few complains about missing binaries during compilation Goals Provide fast and accurate TCP and UDP data transfer Asynchronous processing Less development time Features Dedicated Thread Pool for each TCPServer,TCPClient,UDPServer and UDPClient Multiple listeners per server and multiple connectors per client TCP message collector with character or string message splitter Extasys Help Applications from codemammoth.com Extasys TCP Chat Server - Simple example on how to create your TCP chat server Extasys TCP Chat Client - Simple chat client Extasys TCP Server - Multithreaded TCP server example Extasys TCP Client - TCP Client example Extasys UDP Server - Echo UDP Server Extasys UDP Client - Echo UDP Client Please Donate with PayPal [Less]
Created about 1 year ago.

1 Users

Previous experience with [Apache_Mina](http://mina.apache.org) has led me to the view that abstracting IO can enhance performance while making it significantly easier to write protocols. This ... [More] library's goals are to use event multiplexing to create performant minimal-threaded socket applications. Minimal-threaded meaning threads are supported, but may not be necessary. [Less]
Created over 2 years ago.

0 Users

a lightweight C++ socket network framework. It simplifies the development of OO socket network applications and services that utilize socket communication, socket event demultiplexing, concurrency. ... [More] socketlib is targeted for developers of high-performance socket network communication services and applications. notice: It is stop development! socketlite can be used replacement it. socketlite: http://code.google.com/p/socketlite/ [Less]
Created about 1 year ago.

0 Users

Jexxus (Java Nexus) encapsulates the Java Sockets API, which reduces the redundancy of writing network code and makes it simpler to create an online program. Contains both server and client ... [More] capabilities. It is extremely easy to set up a server which takes advantage of both the TCP and UDP protocols. To start a server, all you have to do is: Server server = new Server(serverListener, 15652); server.startServer(); You can also let the server listen for UDP packets. In this example, the server will receive TCP packets on port 15652 and UDP packets on port 21669. Server server = new Server(serverListener, 15652, 21669); server.startServer(); To connect a client to the server: ClientConnection conn = new ClientConnection(clientListener, "localhost", 15652); or alternatively with UDP as well-- ClientConnection conn = new ClientConnection(clientListener, "localhost", 15652, 21669); conn.connect(); //send with the TCP Protocol conn.send("Hello TCP".getBytes(), Delivery.RELIABLE); //send with the UDP Protocol conn.send("Hello UDP".getBytes(), Delivery.UNRELIABLE); Try it out! It's really easy to get started. [Less]
Created about 1 year ago.

0 Users

typedef struct _SESSION { /* packet */ int timeout; //超时设置 int childid;//代理子连接ID void *child;//代理子连接指针 int parentid;//代理连接父连接ID ... [More] void *parent;//代理连接父连接指针 int packet_type; int packet_length; char *packet_delimiter; int packet_delimiter_length; int buffer_size; /* methods */ /* 当连接发生读写错误或者对端断开的时候 用于错误处理 */ int (*error_handler)(struct _CONN *, CB_DATA *packet, CB_DATA *cache, CB_DATA *chunk); /* 从连接的数据buffer区内读取数据头 */ int (*packet_reader)(struct _CONN *, CB_DATA *buffer); /* 数据头被读取后的处理 */ int (*packet_handler)(struct _CONN *, CB_DATA *packet); /* 数据头之外的数据处理 */ int (*data_handler)(struct _CONN *, CB_DATA *packet, CB_DATA *cache, CB_DATA *chunk); /* 接受完的文件处理 */ int (*file_handler)(struct _CONN *, CB_DATA *packet, CB_DATA *cache); /* 带外数据处理 */ int (*oob_handler)(struct _CONN *, CB_DATA *oob); /* 超时处理(需要通过conn->set_timeout()) */ int (*timeout_handler)(struct _CONN *, CB_DATA *packet, CB_DATA *cache, CB_DATA *chunk); /* 事务处理(需要通过service->new_transaction()注册事务 )*/ int (*transaction_handler)(struct _CONN *, int tid); }SESSION; sbase总体结构 sbase->services service->procthreads procthread->connections. sbase 可以同时运行多个service (sbase->add_service()). sbase主线程负责管理所有service下的监听端口的文件描数字, 如果sbase通过libevbase发现有fd可读会通知service下的成员负责accept操作和添加新连接操作. typedef struct _SBASE { /* base option */ /* 多进程模式下进程数 */ int nchilds; /* 连接数限制 */ int connections_limit; /* while 循环usleep的微妙数 */ int usec_sleep; /* 运行状态 1 为运行 0 为停止 */ int running_status; /* libevbse */ EVBASE *evbase; /* services[] 列表 */ struct _SERVICE **services; /* 当前运行service个数 */ int running_services; /* 心跳计数 */ long long nheartbeat; /* timer && logger */ void *logger; void *timer; /* evtimer 超时检查器 */ void *evtimer; /* message queue for proc mode 多进程模式下的消息队列 */ void *message_queue; int (*set_log)(struct _SBASE *, char *); int (*set_evlog)(struct _SBASE *, char *); /* 添加服务 service需要通过service_init() 初始化以后 */ int (*add_service)(struct _SBASE *, struct _SERVICE *); /* 运行sbase下的所有服务 */ int (*running)(struct _SBASE *, int time_usec); /* 停止sbase下的所有服务 */ void (*stop)(struct _SBASE *); void (*clean)(struct _SBASE **); }SBASE; service 负责管理服务下的所有线程以及连接, service本身不参与主循环的工作, service只是接受sbase的调用以及连接(connection)的调用, 与service相关的业务逻辑都是运行在service->procthreads线程之上, 另外任务(task)运行在service->daemons线程之上. service之上的所有连接根据文件描数字(fd)散列到procthreads之上. typedef struct _SERVICE { /* global */ int lock; /* service下所有线程运行usleep 微妙数*/ int usec_sleep; /* sbase指针 */ SBASE *sbase; /* service下所有线程访问service公共资源的锁 */ void *mutex; /* heartbeat */ /* running heartbeat_handler when looped hearbeat_interval times 心跳间隔 */ int heartbeat_interval; void *heartbeat_arg; /* 心跳回调 */ CALLBACK *heartbeat_handler; /* 设置服务心跳心跳控制由sbase->evtimer完成 */ void (*set_heartbeat)(struct _SERVICE *, int interval, CALLBACK *handler, void *arg); /* 心跳操作激活 会调用service->hearbeat_handler() */ void (*active_heartbeat)(struct _SERVICE *); /* working mode 运行模式*/ int working_mode; /* 多进程模式下使用 */ struct _PROCTHREAD *daemon; /* 线程数 */ int nprocthreads; /* 连接所在线程池 */ struct _PROCTHREAD **procthreads; /* 后台线程个数 */ int ndaemons; /* 用于task的后台线程池, 可选择是否用, 如果ndaemons为0表示不用 */ struct _PROCTHREAD **daemons; /* socket and inet addr option 网络连接或本地监听相关的参数 */ int family; int sock_type; struct sockaddr_in sa; char *ip; int port; int fd; int backlog; /* service option 服务运行相关 */ int service_type; char *service_name; /* 设置服务包括本地监听设置, 初始化远程连接参数 */ int (*set)(struct _SERVICE *service); /* 运行服务, 初始化线程 */ int (*run)(struct _SERVICE *service); /* 停止服务 */ void (*stop)(struct _SERVICE *service); /* event option libevbase 相关 */ EVBASE *evbase; EVENT *event; /* message queue for proc mode 多进程模式下的消息队列, 等同sbase->message_queue */ void *message_queue; /* chunks queue */ /* chunks queue 用于回收存放使用过的chunk片段循环使用, 减少内存分配,提高总体性能。*/ void *chunks_queue; struct _CHUNK *(*popchunk)(struct _SERVICE *service); int (*pushchunk)(struct _SERVICE *service, struct _CHUNK *cp); /* connections option 连接相关参数 */ /* 连接数限制 */ int connections_limit; /* 当前connecions位置最大值 */ int index_max; /* 当前运行连接总数 */ int running_connections; /* service下的所有连接列表 用于统一管理连接 */ struct _CONN **connections; /* C_SERVICE ONLY 客户端服务操作方法 */ /* 客户端连接数 */ int client_connections_limit; /* 发起新连接 */ struct _CONN *(*newconn)(struct _SERVICE *service, int inet_family, int sock_type, char *ip, int port, SESSION *session); /* 添加新连接 */ struct _CONN *(*addconn)(struct _SERVICE *service, int sock_type, int fd, char *remote_ip, int remote_port, char *local_ip, int local_port, SESSION *); /* 获取空闲连接 */ struct _CONN *(*getconn)(struct _SERVICE *service); /* 添加正常正确的连接到service->connecions */ int (*pushconn)(struct _SERVICE *service, struct _CONN *conn); /* 从service->connections 删除指定连接 */ int (*popconn)(struct _SERVICE *service, struct _CONN *conn); /* 代理 */ struct _CONN *(*newproxy)(struct _SERVICE *service, struct _CONN * parent, int inet_family, int sock_type, char *ip, int port, SESSION *session); struct _CONN *(*findconn)(struct _SERVICE *service, int index); /* evtimer 超时检查器 */ void *evtimer; int evid; /* timer and logger */ void *timer; void *logger; int is_inside_logger; int (*set_log)(struct _SERVICE *service, char *logfile); /* transaction and task */ int ntask; /* 运行新任务 任务运行散列通过ntask散列到service->daemons[]之上 */ int (*newtask)(struct _SERVICE *, CALLBACK *, void *arg); /* 在指定连接上执行事务 通过conn->index定位service->connections[] 上 */ int (*newtransaction)(struct _SERVICE *, struct _CONN *, int tid); /* service default session option 设置服务默认业务逻辑的会话参数 */ SESSION session; int (*set_session)(struct _SERVICE *, SESSION *); /* clean */ void (*clean)(struct _SERVICE **pservice); }SERVICE;procthread负责管理线程之上的所有连接, 包括通过libevbase管理连接的读写通知, 管理新连接添加, 数据头读, 数据头处理, 数据处理, 事务处理, 错误处理, 超时处理等消息. 新连接操作流程: 1. sbase->evbase->loop() 发现某个连接; 4. procthread->evbase->loop() 检查连接状态, 同时通过conn->event_handler激活读写; 5. conn->read_handler()读取数据到conn->buffer, 同时调用conn->packet_reader()读取数据头; 6. 数据头读取后添加MESSAGE_PACKET_HANDLE消息, procthread通过消息队列循环调用conn->packet_handler()处理数据头; 9. 数据处理完毕, 如果需要发送数据的话可以通过conn->push_chunk()发送数据块或者通过conn->push_file()发送文件, 同时添加fd写事件到procthread->evbase, 添加数据参数到conn->send_queue; http://sbase.googlecode.com/files/libevbase-0.0.15.tar.gz NOTE: if you want to build rpm , look at doc/libsbase.spec [Less]
Created about 1 year ago.

0 Users

SolidGround is a C++ framework intending to offer everything one need to build powerful, distributed, highly-scalable, client-server applications. Its is designed and implemented for speed and power ... [More] , with great interest on the ease of use by the developers. Although in first step it will be released only for Linux, its design allows easy porting to other platforms (planned are Solaris and Windows). Here is a list with what the framework includes: A powerful build system based on CMake (http://www.cmake.org/) which allows easy integration of applications based on the framework. A system library which wraps up threads, synchronization objects, thread specific, file access, socket address, debug logging engine etc. Asynchronous signaling engine. Asynchronous TCP and UDP communication engine, single-channel and multi-channel(for easily implementing proxies and other communication nodes, e.g. chat rooms); Secure Socket support for the asynchronous TCP communication, using OpenSSL library(http://www.openssl.org/); Asynchronous multiplexed IPC (Inter Process Communication) / RPC (Remote Procedure Call) engine with keep-alive support for peer disconnection detection. The protocol allows for sending commands (of any size - one can even send file streams) to a peer process over multiplexed UDP. A nice serialization engine (for now only binary, non portable - used by IPC) A nice asynchronous ready, text protocol engine (parser and response builder) for protocols like IMAP, POP, SMTP etc. A file stream manager for asynchronous usage (e.g. if you want a read-only stream for a file which is locked for writing, the manager will signal you the stream when unlocked) A nice audit/log engine. Doxygen documentation. Lots of test applications, including a central proof of concept multi service server. NOTES Please consider visiting my newly started project based on SolidGround framework: http://code.google.com/p/solidbox/. [Less]
Created about 1 year ago.

0 Users

一个简单 灵活 高效 的 TCP服务器框架
Created 7 months ago.

0 Users

bas(name as boost_asio_server) is a server framework implementation of the Half-Sync/Half-Async mode, can greatly simplify the development of tcp server. copyright (c) 2009 Xu Ye Jun ... [More] (moore.xu@gmail.com), distributed under the Boost Software License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). bas为boost_asio_server(baserver)的简称,是采用Half-Sync/Half-Async模式的服务器框架,使用c++实现,能够大大简化tcp server的开发工作。bas目前实现了以下功能: 1、底层基于boost及asio实现,支持ssl,跨越多种操作系统平台; 2、I/O部分使用非阻塞异步处理机制、业务逻辑处理部分采用同步线程池实现,便于更好的利用多处理器资源; 3、封装处理各种I/O操作及状态,采用无共享锁/无引用计数设计,控制逻辑清晰、简单,用户应用程序无须关心I/O操作细节,只需要关心业务逻辑的具体实现; 4、提供多级tcp server访问处理机制,非常容易实现各种代理服务器; 5、提供echo_server/echo_client、ssl_server/ssl_client、proxy_server、http_server(基于asio的http server示例)等示例供参考。 请使用svn checkout最新的代码。 本软件的版权由Xu Ye Jun(moore.xu@gmail.com)所有,基于Boost Software License(Version 1.0)发布,具体规则参见http://www.boost.org/LICENSE_1_0.txt。 [Less]
Created 11 months ago.

0 Users

Yet another nio framework for javaYanf4j is another nio framework for java,it is light weight,simple and have a great performance.It only supports non-blocking mode for tcp/udp server and client,it ... [More] doesn't supports blocking mode.It needs jdk>=5.0. ExampleA Time Server import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import com.google.code.yanf4j.nio.Session; import com.google.code.yanf4j.nio.impl.HandlerAdapter; public class TimeHandler extends HandlerAdapter{ @Override public void onSessionStarted(Session session) { Date date = new Date(); DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); session.asyncWrite(dateFormat.format(date)); session.flush(); session.close(); [Less]
Created about 1 year ago.