Lines Matching refs:sock
285 int sock = -1;
316 sock = ::socket(AF_UNIX, SOCK_STREAM, 0);
317 if (sock < 0) {
326 cc = ::bind(sock, (struct sockaddr*) &addr, SUN_LEN(&addr));
333 mHandle = (unsigned long) sock;
334 sock = -1;
339 if (sock >= 0)
340 close(sock);
351 int sock = -1;
362 sock = ::socket(AF_UNIX, SOCK_STREAM, 0);
363 if (sock < 0) {
372 cc = ::connect(sock, (struct sockaddr*) &addr, SUN_LEN(&addr));
382 * Create the two halves. We dup() the sock so that closing one side
386 (*ppReadPipe)->createReader(sock);
388 (*ppWritePipe)->createWriter(dup(sock));
391 sock = -1;
397 if (sock >= 0)
398 close(sock);
410 int sock, lsock;
424 sock = ::accept(lsock, (struct sockaddr*) &from, &fromlen);
425 if (sock < 0) {
431 * Create the two halves. We dup() the sock so that closing one side
435 (*ppReadPipe)->createReader(sock);
437 (*ppWritePipe)->createWriter(dup(sock));