| | |
| | | */ |
| | | void * bus_server_socket_wrapper_open() { |
| | | |
| | | NetModSocket *sockt = new NetModSocket; |
| | | BusServerSocket *sockt = new BusServerSocket; |
| | | return (void *)sockt; |
| | | } |
| | | |
| | |
| | | * 关闭 |
| | | */ |
| | | void bus_server_socket_wrapper_close(void *_socket) { |
| | | NetModSocket *sockt = (NetModSocket *)_socket; |
| | | BusServerSocket *sockt = (BusServerSocket *)_socket; |
| | | delete sockt; |
| | | } |
| | | |
| | |
| | | */ |
| | | int bus_server_socket_wrapper_start_bus(void * _socket) { |
| | | int ret; |
| | | NetModSocket *sockt = (NetModSocket *)_socket; |
| | | BusServerSocket *sockt = (BusServerSocket *)_socket; |
| | | |
| | | if( (ret = sockt->bind(BUS_KEY)) == 0) { |
| | | return sockt->start_bus(); |
| | | return sockt->start(); |
| | | } else { |
| | | logger->error("start bus failed"); |
| | | return -1; |