Lines Matching defs:bind_ctx
350 int mbedtls_net_accept(mbedtls_net_context *bind_ctx,
370 if (getsockopt(bind_ctx->fd, SOL_SOCKET, SO_TYPE,
378 ret = client_ctx->fd = (int) accept(bind_ctx->fd,
384 ret = (int) recvfrom(bind_ctx->fd, buf, sizeof(buf), MSG_PEEK,
397 if (net_would_block(bind_ctx) != 0) {
410 if (connect(bind_ctx->fd, (struct sockaddr *) &client_addr, n) != 0) {
414 client_ctx->fd = bind_ctx->fd;
415 bind_ctx->fd = -1; /* In case we exit early */
420 (bind_ctx->fd = (int) socket(local_addr.ss_family,
422 setsockopt(bind_ctx->fd, SOL_SOCKET, SO_REUSEADDR,
427 if (bind(bind_ctx->fd, (struct sockaddr *) &local_addr, n) != 0) {