Skip to content
Snippets Groups Projects
Commit 413aa25d authored by Alexandr Mruchok's avatar Alexandr Mruchok
Browse files

[-] removed libmemcached

parent 608a3f5d
No related branches found
No related tags found
1 merge request!2Feature 2648
cmake_minimum_required(VERSION 3.0)
project (dap_stream_ch_chain_net_srv)
set(DAP_STREAM_CH_CHAIN_NET_SRV_SRCS dap_stream_ch_chain_net_srv.c)
set(DAP_STREAM_CH_CHAIN_NET_SRV_SRCS dap_stream_ch_chain_net_srv.c dap_stream_ch_chain_net_srv_pkt.c)
if(WIN32)
include_directories(../libdap/src/win32/)
include_directories(../3rdparty/wepoll/include/)
include_directories(../3rdparty/uthash/src/)
include_directories(../3rdparty/libjson-c/)
include_directories(../3rdparty/libmagic/src/)
include_directories(../3rdparty/curl/include/)
include_directories(../3rdparty/libsqlite3/)
endif()
add_library(${PROJECT_NAME} STATIC ${DAP_STREAM_CH_CHAIN_NET_SRV_SRCS})
target_link_libraries(dap_stream_ch_chain_net_srv dap_core dap_crypto dap_core_server dap_stream dap_stream_ch dap_stream_ch_chain dap_stream_ch_chain_net )
target_link_libraries(dap_stream_ch_chain_net_srv dap_core dap_crypto dap_chain dap_chain_net dap_chain_net_srv dap_server_core dap_stream dap_stream_ch dap_stream_ch_chain dap_stream_ch_chain_net)
target_include_directories(dap_stream_ch_chain_net_srv INTERFACE .)
LICENSE 100644 → 100755
File mode changed from 100644 to 100755
README.md 100644 → 100755
File mode changed from 100644 to 100755
/*
* Authors:
* Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net>
* DeM Labs Inc. https://demlabs.net
* Kelvin Project https://github.com/kelvinblockchain
* Copyright (c) 2017-2018
* All rights reserved.
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#ifdef WIN32
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#include <winsock2.h>
#include <windows.h>
#include <mswsock.h>
#include <ws2tcpip.h>
#include <io.h>
//#include "wrappers.h"
#include <wepoll.h>
#include <pthread.h>
#endif
#include "dap_common.h"
#include "dap_stream.h"
#include "dap_stream_ch.h"
#include "dap_stream_ch_chain_net_srv.h"
#include "dap_stream_ch_proc.h"
#define LOG_TAG "dap_stream_ch_chain_net_srv"
typedef struct dap_stream_ch_chain_net_srv {
pthread_mutex_t mutex;
} dap_stream_ch_chain_net_srv_t;
#define DAP_STREAM_CH_CHAIN_NET_SRV(a) ((dap_stream_ch_chain_net_srv_t *) ((a)->internal) )
static void s_stream_ch_new(dap_stream_ch_t* ch , void* arg);
static void s_stream_ch_delete(dap_stream_ch_t* ch , void* arg);
static void s_stream_ch_packet_in(dap_stream_ch_t* ch , void* arg);
static void s_stream_ch_packet_out(dap_stream_ch_t* ch , void* arg);
/**
* @brief dap_stream_ch_chain_net_init
* @return
*/
int dap_stream_ch_chain_net_srv_init()
{
log_it(L_NOTICE,"Chain network services channel initialized");
dap_stream_ch_proc_add('S',s_stream_ch_new,s_stream_ch_delete,s_stream_ch_packet_in,s_stream_ch_packet_out);
return 0;
}
/**
* @brief dap_stream_ch_chain_deinit
*/
void dap_stream_ch_chain_net_srv_deinit()
{
}
/**
* @brief s_stream_ch_new
* @param a_ch
* @param arg
*/
void s_stream_ch_new(dap_stream_ch_t* a_ch , void* arg)
{
a_ch->internal=DAP_NEW_Z(dap_stream_ch_chain_net_srv_t);
dap_stream_ch_chain_net_srv_t * l_ch_chain_net_srv = DAP_STREAM_CH_CHAIN_NET_SRV(a_ch);
pthread_mutex_init( &l_ch_chain_net_srv->mutex,NULL);
}
/**
* @brief s_stream_ch_delete
* @param ch
* @param arg
*/
void s_stream_ch_delete(dap_stream_ch_t* ch , void* arg)
{
}
/**
* @brief s_stream_ch_packet_in
* @param ch
* @param arg
*/
void s_stream_ch_packet_in(dap_stream_ch_t* ch , void* arg)
{
}
/**
* @brief s_stream_ch_packet_out
* @param ch
* @param arg
*/
void s_stream_ch_packet_out(dap_stream_ch_t* ch , void* arg)
{
}
/*
* Authors:
* Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net>
* DeM Labs Inc. https://demlabs.net
* Kelvin Project https://github.com/kelvinblockchain
* Copyright (c) 2017-2018
* All rights reserved.
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
**/
#pragma once
int dap_stream_ch_chain_net_srv_init();
void dap_stream_ch_chain_net_srv_deinit();
/*
* Authors:
* Dmitriy A. Gearasimov <gerasimov.dmitriy@demlabs.net>
* DeM Labs Inc. https://demlabs.net
* Kelvin Project https://github.com/kelvinblockchain
* Copyright (c) 2017-2018
* All rights reserved.
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
**/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#ifdef WIN32
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#include <winsock2.h>
#include <windows.h>
#include <mswsock.h>
#include <ws2tcpip.h>
#include <io.h>
//#include "wrappers.h"
#include <wepoll.h>
#include <pthread.h>
#endif
#include "dap_chain_net_srv_common.h"
typedef struct dap_stream_ch_chain_net_srv_pkt_hdr{
dap_chain_net_srv_uid_t srv_uid;
uint32_t type; // Chain data type
union{
struct{
}type_block;
struct{
}type_datum;
struct{
}type_global_db;
};
} __attribute__((packed)) dap_stream_ch_chain_net_srv_pkt_hdr_t;
typedef struct dap_stream_ch_chain_net_srv_pkt{
dap_stream_ch_chain_net_srv_pkt_hdr_t hdr;
uint8_t data[];
} __attribute__((packed)) dap_stream_ch_chain_net_srv_pkt_t;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment