Lines Matching defs:sock
74 static int authenticate_to_floppyd(RemoteFile_t *floppyd, int sock, char *display)
96 write(sock, buf, 8);
98 if ( (l = read_dword(sock)) < 4) {
102 errcode = read_dword(sock);
109 floppyd->version = read_dword(sock);
111 floppyd->capabilities = read_dword(sock);
114 write(sock, xcookie, filelen+4);
116 if (read_dword(sock) != 4) {
120 errcode = read_dword(sock);
494 int sock;
499 if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
514 if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
523 setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE,
527 return (sock);
579 int sock;
587 sock = connect_to_server(getipaddress(hostname), port);
589 if (sock == -1) {
602 reply = authenticate_to_floppyd(floppyd, sock, display);
623 return sock;