newsock 775 src/simh/sim_sock.c SOCKET newsock; newsock 778 src/simh/sim_sock.c newsock = socket (af, ((opt_flags & SIM_SOCK_OPT_DATAGRAM) ? SOCK_DGRAM : SOCK_STREAM), 0);/* create socket */ newsock 779 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 783 src/simh/sim_sock.c return newsock; newsock 785 src/simh/sim_sock.c return sim_err_sock (newsock, "socket"); /* report error and return */ newsock 787 src/simh/sim_sock.c return newsock; newsock 799 src/simh/sim_sock.c SOCKET newsock = INVALID_SOCKET; newsock 810 src/simh/sim_sock.c return newsock; newsock 820 src/simh/sim_sock.c return newsock; newsock 837 src/simh/sim_sock.c newsock = sim_create_sock (preferred->ai_family, 0); /* create socket */ newsock 838 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 853 src/simh/sim_sock.c return newsock; newsock 858 src/simh/sim_sock.c sta = setsockopt (newsock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&off, sizeof(off)); newsock 864 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)); newsock 870 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *)&on, sizeof(on)); newsock 873 src/simh/sim_sock.c sta = bind (newsock, preferred->ai_addr, preferred->ai_addrlen); newsock 876 src/simh/sim_sock.c return sim_err_sock (newsock, "bind"); newsock 878 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 880 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 882 src/simh/sim_sock.c sta = listen (newsock, 64); /* listen on socket */ newsock 884 src/simh/sim_sock.c return sim_err_sock (newsock, "listen"); newsock 885 src/simh/sim_sock.c return newsock; /* got it! */ newsock 892 src/simh/sim_sock.c SOCKET newsock = INVALID_SOCKET; newsock 925 src/simh/sim_sock.c newsock = sim_create_sock (result->ai_family, opt_flags & SIM_SOCK_OPT_DATAGRAM);/* create socket */ newsock 926 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 929 src/simh/sim_sock.c return newsock; newsock 932 src/simh/sim_sock.c sta = bind (newsock, source->ai_addr, source->ai_addrlen); newsock 937 src/simh/sim_sock.c return sim_err_sock (newsock, "bind"); newsock 941 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 942 src/simh/sim_sock.c newsock = sim_create_sock (result->ai_family, opt_flags & SIM_SOCK_OPT_DATAGRAM);/* create socket */ newsock 943 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 945 src/simh/sim_sock.c return newsock; newsock 950 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 953 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 957 src/simh/sim_sock.c sta = sim_setnodelay (newsock); /* set nodelay */ newsock 960 src/simh/sim_sock.c return sim_err_sock (newsock, "setnodelay"); newsock 967 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_KEEPALIVE, (char *)&keepalive, sizeof(keepalive)); newsock 969 src/simh/sim_sock.c return sim_err_sock (newsock, "setsockopt KEEPALIVE"); newsock 972 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 974 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 976 src/simh/sim_sock.c sta = connect (newsock, result->ai_addr, result->ai_addrlen); newsock 985 src/simh/sim_sock.c sim_close_sock (newsock); newsock 986 src/simh/sim_sock.c newsock = INVALID_SOCKET; newsock 989 src/simh/sim_sock.c return sim_err_sock (newsock, "connect"); newsock 994 src/simh/sim_sock.c return sim_err_sock (newsock, "connect"); newsock 996 src/simh/sim_sock.c return newsock; /* got it! */ newsock 1008 src/simh/sim_sock.c SOCKET newsock; newsock 1015 src/simh/sim_sock.c newsock = accept (master, (struct sockaddr *) &clientname, &size); newsock 1016 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* error? */ newsock 1019 src/simh/sim_sock.c sim_err_sock(newsock, "accept"); newsock 1036 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 1038 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 1042 src/simh/sim_sock.c sta = sim_setnodelay (newsock); /* set nonblocking */ newsock 1044 src/simh/sim_sock.c return sim_err_sock (newsock, "setnodelay"); newsock 1048 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_KEEPALIVE, (char *)&keepalive, sizeof(keepalive)); newsock 1050 src/simh/sim_sock.c return sim_err_sock (newsock, "setsockopt KEEPALIVE"); newsock 1052 src/simh/sim_sock.c return newsock; newsock 800 src/simh/sim_tmxr.c SOCKET newsock; newsock 905 src/simh/sim_tmxr.c newsock = mp->ring_sock; newsock 911 src/simh/sim_tmxr.c newsock = sim_accept_conn_ex (mp->master, &address, (mp->packet ? SIM_SOCK_OPT_NODELAY : 0));/* poll connect */ newsock 913 src/simh/sim_tmxr.c if (newsock != INVALID_SOCKET) { /* got a live one? */ newsock 951 src/simh/sim_tmxr.c mp->ring_sock = newsock; newsock 956 src/simh/sim_tmxr.c mp->ring_sock = newsock; newsock 970 src/simh/sim_tmxr.c tmxr_msg (newsock, "No answer on any connection\r\n"); newsock 971 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 977 src/simh/sim_tmxr.c tmxr_msg (newsock, "All connections busy\r\n"); newsock 978 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 985 src/simh/sim_tmxr.c lp->sock = newsock; /* save socket */ newsock 990 src/simh/sim_tmxr.c sim_write_sock (newsock, (char *)mantra, sizeof(mantra)); newsock 1087 src/simh/sim_tmxr.c while (INVALID_SOCKET != (newsock = sim_accept_conn_ex (lp->master, &address, newsock 1091 src/simh/sim_tmxr.c sim_getnames_sock (newsock, &sockname, &peername); newsock 1102 src/simh/sim_tmxr.c tmxr_msg (newsock, "Rejecting connection from unexpected source\r\n"); newsock 1105 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 1119 src/simh/sim_tmxr.c lp->sock = newsock; /* save socket */ newsock 1123 src/simh/sim_tmxr.c sim_write_sock (newsock, (char *)mantra, sizeof(mantra)); newsock 1144 src/simh/sim_tmxr.c tmxr_msg (newsock, "Line connection not available\r\n"); newsock 1145 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 1150 src/simh/sim_tmxr.c tmxr_msg (newsock, "Line connection busy\r\n"); newsock 1151 src/simh/sim_tmxr.c sim_close_sock (newsock);