Home | History | Annotate | Download | only in block

Lines Matching refs:sock

37     int sock;
47 int sock;
60 sock = unix_socket_outgoing(unixpath);
79 sock = tcp_socket_outgoing(hostname, port);
82 if (sock == -1)
85 ret = nbd_receive_negotiate(sock, &size, &blocksize);
89 s->sock = sock;
108 if (nbd_send_request(s->sock, &request) == -1)
111 if (nbd_receive_reply(s->sock, &reply) == -1)
120 if (nbd_wr_sync(s->sock, buf, request.len, 1) != request.len)
138 if (nbd_send_request(s->sock, &request) == -1)
141 if (nbd_wr_sync(s->sock, (uint8_t*)buf, request.len, 0) != request.len)
144 if (nbd_receive_reply(s->sock, &reply) == -1)
165 nbd_send_request(s->sock, &request);
167 close(s->sock);