Lines Matching refs:sock
70 static int authenticate_to_floppyd(char fullauth, int sock, char *display,
93 write(sock, buf, 8);
95 bytesRead = read_dword(sock);
102 errcode = read_dword(sock);
110 protoversion = read_dword(sock);
111 read_dword(sock);
118 write(sock, xcookie, filelen+4);
120 if (read_dword(sock) != 4) {
124 errcode = read_dword(sock);
204 int sock;
209 if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
224 if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
238 return (sock);
247 int sock;
270 sock = connect_to_server(getipaddress(hostname), port);
272 if (sock == -1) {
281 reply = authenticate_to_floppyd(fullauth, sock, display,
303 write_dword(sock, 1);
304 write(sock, &opcode, 1);
306 close(sock);