sock 1289 src/dps8/dps8_mgp.c int slen, sock; sock 1292 src/dps8/dps8_mgp.c if (( sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) sock 1298 src/dps8/dps8_mgp.c return sock; sock 1305 src/dps8/dps8_mgp.c if (connect(sock, (struct sockaddr *)&server, slen) < 0) sock 1310 src/dps8/dps8_mgp.c close(sock); sock 1311 src/dps8/dps8_mgp.c sock = 0; sock 1314 src/dps8/dps8_mgp.c return sock; sock 99 src/dps8/udplib.c int sock; sock 251 src/dps8/udplib.c int sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); sock 252 src/dps8/udplib.c if (sock == -1) sock 255 src/dps8/udplib.c rc = fcntl (sock, F_SETFL, fcntl (sock, F_GETFL, 0) | O_NONBLOCK); sock 266 src/dps8/udplib.c rc = bind (sock, (struct sockaddr *) & si_me, sizeof (si_me)); sock 280 src/dps8/udplib.c rc = connect (sock, ai -> ai_addr, sizeof (struct sockaddr)); sock 286 src/dps8/udplib.c udp_links [link] . sock = sock; sock 315 src/dps8/udplib.c close (udp_links [link] . sock); sock 362 src/dps8/udplib.c ssize_t rc = send (udp_links [link] . sock, & pkt, (size_t) pktlen, 0); sock 401 src/dps8/udplib.c ssize_t n = read (udp_links [link] . sock, ppkt, pktsiz); sock 1016 src/simh/sim_console.c !sim_rem_con_tmxr.ldsc[0].sock) /* Master Connection lost? */ sock 1553 src/simh/sim_console.c if (sim_con_ldsc.sock == 0) sock 711 src/simh/sim_sock.c static int sim_setnonblock (SOCKET sock) sock 715 src/simh/sim_sock.c return ioctlsocket (sock, FIONBIO, &non_block); /* set nonblocking */ sock 719 src/simh/sim_sock.c static int sim_setnonblock (SOCKET sock) sock 723 src/simh/sim_sock.c fl = fcntl (sock, F_GETFL,0); /* get flags */ sock 726 src/simh/sim_sock.c sta = fcntl (sock, F_SETFL, fl | O_NONBLOCK); /* set nonblock */ sock 731 src/simh/sim_sock.c sta = fcntl (sock, F_SETOWN, getpid()); /* set ownership */ sock 740 src/simh/sim_sock.c static int sim_setnodelay (SOCKET sock) sock 746 src/simh/sim_sock.c sta = setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (char *)&nodelay, sizeof(nodelay)); sock 752 src/simh/sim_sock.c sta = setsockopt (sock, IPPROTO_TCP, TCP_NODELAYACK, (char *)&nodelay, sizeof(nodelay)); sock 759 src/simh/sim_sock.c sta = setsockopt (sock, IPPROTO_TCP, TCP_QUICKACK, (char *)&nodelay, sizeof(nodelay)); sock 1048 src/simh/sim_sock.c int sim_check_conn (SOCKET sock, int rd) sock 1064 src/simh/sim_sock.c FD_SET (sock, rw_p); sock 1065 src/simh/sim_sock.c FD_SET (sock, er_p); sock 1067 src/simh/sim_sock.c select ((int) sock + 1, rw_p, NULL, er_p, &zero); sock 1069 src/simh/sim_sock.c select ((int) sock + 1, NULL, rw_p, er_p, &zero); sock 1070 src/simh/sim_sock.c if (FD_ISSET (sock, er_p)) sock 1072 src/simh/sim_sock.c if (FD_ISSET (sock, rw_p)) { sock 1073 src/simh/sim_sock.c if (0 == getpeername (sock, (struct sockaddr *)&peername, &peernamesize)) sock 1106 src/simh/sim_sock.c int sim_getnames_sock (SOCKET sock, char **socknamebuf, char **peernamebuf) sock 1123 src/simh/sim_sock.c getsockname (sock, (struct sockaddr *)&sockname, &socknamesize); sock 1124 src/simh/sim_sock.c getpeername (sock, (struct sockaddr *)&peername, &peernamesize); sock 1136 src/simh/sim_sock.c int sim_read_sock (SOCKET sock, char *buf, int nbytes) sock 1140 src/simh/sim_sock.c rbytes = recv (sock, buf, nbytes, 0); sock 1163 src/simh/sim_sock.c int sim_write_sock (SOCKET sock, const char *msg, int nbytes) sock 1165 src/simh/sim_sock.c int err, sbytes = send (sock, msg, nbytes, 0); sock 1179 src/simh/sim_sock.c void sim_close_sock (SOCKET sock) sock 1181 src/simh/sim_sock.c shutdown(sock, SD_BOTH); sock 1182 src/simh/sim_sock.c closesocket (sock); sock 100 src/simh/sim_sock.h int sim_check_conn (SOCKET sock, int rd); sock 101 src/simh/sim_sock.h int sim_read_sock (SOCKET sock, char *buf, int nbytes); sock 102 src/simh/sim_sock.h int sim_write_sock (SOCKET sock, const char *msg, int nbytes); sock 103 src/simh/sim_sock.h void sim_close_sock (SOCKET sock); sock 105 src/simh/sim_sock.h SOCKET sim_err_sock (SOCKET sock, const char *emsg); sock 106 src/simh/sim_sock.h int sim_getnames_sock (SOCKET sock, char **socknamebuf, char **peernamebuf); sock 510 src/simh/sim_tmxr.c return sim_read_sock (lp->sock, &(lp->rxb[i]), length); sock 528 src/simh/sim_tmxr.c written = sim_write_sock (lp->sock, &(lp->txb[i]), length); sock 1003 src/simh/sim_tmxr.c lp->sock = newsock; /* save socket */ sock 1066 src/simh/sim_tmxr.c lp->sock = lp->connecting; /* it now looks normal */ sock 1087 src/simh/sim_tmxr.c sim_getnames_sock (lp->sock, &sockname, &peername); sock 1130 src/simh/sim_tmxr.c lp->sock = newsock; /* save socket */ sock 1172 src/simh/sim_tmxr.c if (lp->destination && (!lp->sock) && (!lp->connecting) && sock 1198 src/simh/sim_tmxr.c if (lp->sock) { sock 1199 src/simh/sim_tmxr.c sim_close_sock (lp->sock); /* close socket */ sock 1202 src/simh/sim_tmxr.c lp->sock = 0; sock 1260 src/simh/sim_tmxr.c if ((lp->sock) sock 1287 src/simh/sim_tmxr.c lp->sock = lp->mp->ring_sock; /* save socket */ sock 1295 src/simh/sim_tmxr.c sim_write_sock (lp->sock, (char *)mantra, sizeof(mantra)); sock 1346 src/simh/sim_tmxr.c if ((lp->sock) || (lp->connecting)) { sock 1348 src/simh/sim_tmxr.c if (lp->sock) sock 1368 src/simh/sim_tmxr.c if ((lp->sock) || (lp->connecting)) { sock 1370 src/simh/sim_tmxr.c if (lp->sock) sock 1592 src/simh/sim_tmxr.c if (!(lp->sock sock 2057 src/simh/sim_tmxr.c if (lp->sock) { /* if existing tcp, drop it */ sock 2065 src/simh/sim_tmxr.c lp->sock = lp->connecting; sock 2187 src/simh/sim_tmxr.c SOCKET sock; sock 2336 src/simh/sim_tmxr.c sock = sim_master_sock (port, &r); /* make master socket to validate port */ sock 2339 src/simh/sim_tmxr.c if (sock == INVALID_SOCKET) /* open error */ sock 2341 src/simh/sim_tmxr.c sim_close_sock (sock); sock 2379 src/simh/sim_tmxr.c sock = sim_connect_sock_ex (NULL, hostport, "localhost", NULL, (datagram ? SIM_SOCK_OPT_DATAGRAM : 0) | sock 2382 src/simh/sim_tmxr.c if (sock != INVALID_SOCKET) sock 2383 src/simh/sim_tmxr.c sim_close_sock (sock); sock 2509 src/simh/sim_tmxr.c sock = sim_master_sock (listen, &r); /* make master socket */ sock 2512 src/simh/sim_tmxr.c if (sock == INVALID_SOCKET) /* open error */ sock 2535 src/simh/sim_tmxr.c mp->master = sock; /* save master socket */ sock 2548 src/simh/sim_tmxr.c lp->sock = 0; /* clear the socket */ sock 2588 src/simh/sim_tmxr.c sock = sim_connect_sock_ex (datagram ? listen : NULL, hostport, "localhost", NULL, (datagram ? SIM_SOCK_OPT_DATAGRAM : 0) | sock 2591 src/simh/sim_tmxr.c if (sock != INVALID_SOCKET) { sock 2609 src/simh/sim_tmxr.c lp->connecting = sock; sock 2626 src/simh/sim_tmxr.c sim_close_sock (sock); sock 2726 src/simh/sim_tmxr.c sock = sim_master_sock (listen, &r); /* make master socket */ sock 2729 src/simh/sim_tmxr.c if (sock == INVALID_SOCKET) /* open error */ sock 2747 src/simh/sim_tmxr.c lp->master = sock; /* save master socket */ sock 2775 src/simh/sim_tmxr.c sock = sim_connect_sock_ex (datagram ? listen : NULL, hostport, "localhost", NULL, (datagram ? SIM_SOCK_OPT_DATAGRAM : 0) | (packet ? SIM_SOCK_OPT_NODELAY : 0)); sock 2776 src/simh/sim_tmxr.c if (sock != INVALID_SOCKET) { sock 2793 src/simh/sim_tmxr.c lp->connecting = sock; sock 2810 src/simh/sim_tmxr.c sim_close_sock (sock); sock 3107 src/simh/sim_tmxr.c if ((!lp->sock) && (!lp->connecting) sock 3136 src/simh/sim_tmxr.c if (!lp->destination && lp->sock) { /* not serial and is connected? */ sock 3141 src/simh/sim_tmxr.c if (lp->sock) { sock 3148 src/simh/sim_tmxr.c lp->sock = lp->connecting; sock 3441 src/simh/sim_tmxr.c void tmxr_msg (SOCKET sock, const char *msg) sock 3443 src/simh/sim_tmxr.c if ((sock) && (sock != INVALID_SOCKET)) sock 3444 src/simh/sim_tmxr.c sim_write_sock (sock, msg, (int32)strlen (msg)); sock 3537 src/simh/sim_tmxr.c if ((lp->sock) || (lp->connecting)) { /* tcp connection? */ sock 3549 src/simh/sim_tmxr.c if (lp->sock) { sock 3552 src/simh/sim_tmxr.c sim_getnames_sock (lp->sock, &sockname, &peername); sock 3581 src/simh/sim_tmxr.c (lp->sock) && (!lp->datagram)) sock 3601 src/simh/sim_tmxr.c if ((!lp->sock) && (!lp->connecting) sock 3670 src/simh/sim_tmxr.c if ((lp->sock) sock 3941 src/simh/sim_tmxr.c if ((mp->ldsc[i].sock != 0) sock 3961 src/simh/sim_tmxr.c if ((mp->ldsc[i].sock != 0) sock 3963 src/simh/sim_tmxr.c if ((mp->ldsc[i].sock != 0) sock 3969 src/simh/sim_tmxr.c if ((mp->ldsc[i].sock != 0) sock 125 src/simh/sim_tmxr.h SOCKET sock; /* connection socket */ sock 246 src/simh/sim_tmxr.h void tmxr_msg (SOCKET sock, const char *msg);