Browse Source

Test

etomic
jl777 7 years ago
parent
commit
0918e5da8c
  1. 4
      crypto777/nanosrc/transports/ws/cws.c
  2. 2
      crypto777/nanosrc/transports/ws/ws.c

4
crypto777/nanosrc/transports/ws/cws.c

@ -329,7 +329,7 @@ static void nn_cws_handler (struct nn_fsm *self, int src, int type,
struct nn_cws *cws;
cws = nn_cont (self, struct nn_cws, fsm);
printf("cws_handler src.%d type.%d state.%d\n",src,type,cws->state);
switch (cws->state) {
/******************************************************************************/
@ -409,6 +409,7 @@ static void nn_cws_handler (struct nn_fsm *self, int src, int type,
case NN_CWS_SRC_USOCK:
switch (type) {
case NN_USOCK_CONNECTED:
printf("cws connected\n");
nn_sws_start (&cws->sws, &cws->usock, NN_WS_CLIENT,
nn_chunkref_data (&cws->resource),
nn_chunkref_data (&cws->remote_host));
@ -421,6 +422,7 @@ static void nn_cws_handler (struct nn_fsm *self, int src, int type,
nn_epbase_clear_error (&cws->epbase);
return;
case NN_USOCK_ERROR:
printf("cws NN_USOCK_ERROR\n");
nn_epbase_set_error (&cws->epbase,nn_usock_geterrno (&cws->usock),__FILE__,__LINE__);
nn_usock_stop(&cws->usock);
cws->state = NN_CWS_STATE_STOPPING_USOCK;

2
crypto777/nanosrc/transports/ws/ws.c

@ -156,7 +156,7 @@ int nn_ws_send (int s, const void *msg, size_t len, uint8_t msg_type, int flags)
struct nn_msghdr hdr;
struct nn_cmsghdr *cmsg;
size_t cmsgsz;
printf("nn_ws_send\n");
iov.iov_base = (void*) msg;
iov.iov_len = len;

Loading…
Cancel
Save