newsock 769 src/simh/sim_sock.c SOCKET newsock; newsock 772 src/simh/sim_sock.c newsock = socket (af, ((opt_flags & SIM_SOCK_OPT_DATAGRAM) ? SOCK_DGRAM : SOCK_STREAM), 0);/* create socket */ newsock 773 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 777 src/simh/sim_sock.c return newsock; newsock 779 src/simh/sim_sock.c return sim_err_sock (newsock, "socket"); /* report error and return */ newsock 781 src/simh/sim_sock.c return newsock; newsock 793 src/simh/sim_sock.c SOCKET newsock = INVALID_SOCKET; newsock 804 src/simh/sim_sock.c return newsock; newsock 814 src/simh/sim_sock.c return newsock; newsock 831 src/simh/sim_sock.c newsock = sim_create_sock (preferred->ai_family, 0); /* create socket */ newsock 832 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 847 src/simh/sim_sock.c return newsock; newsock 852 src/simh/sim_sock.c sta = setsockopt (newsock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&off, sizeof(off)); newsock 858 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)); newsock 864 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *)&on, sizeof(on)); newsock 867 src/simh/sim_sock.c sta = bind (newsock, preferred->ai_addr, preferred->ai_addrlen); newsock 870 src/simh/sim_sock.c return sim_err_sock (newsock, "bind"); newsock 872 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 874 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 876 src/simh/sim_sock.c sta = listen (newsock, 1); /* listen on socket */ newsock 878 src/simh/sim_sock.c return sim_err_sock (newsock, "listen"); newsock 879 src/simh/sim_sock.c return newsock; /* got it! */ newsock 884 src/simh/sim_sock.c SOCKET newsock = INVALID_SOCKET; newsock 918 src/simh/sim_sock.c newsock = sim_create_sock (result->ai_family, opt_flags & SIM_SOCK_OPT_DATAGRAM);/* create socket */ newsock 919 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 922 src/simh/sim_sock.c return newsock; newsock 925 src/simh/sim_sock.c sta = bind (newsock, source->ai_addr, source->ai_addrlen); newsock 930 src/simh/sim_sock.c return sim_err_sock (newsock, "bind"); newsock 934 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 935 src/simh/sim_sock.c newsock = sim_create_sock (result->ai_family, opt_flags & SIM_SOCK_OPT_DATAGRAM);/* create socket */ newsock 936 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 938 src/simh/sim_sock.c return newsock; newsock 943 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 946 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 950 src/simh/sim_sock.c sta = sim_setnodelay (newsock); /* set nodelay */ newsock 953 src/simh/sim_sock.c return sim_err_sock (newsock, "setnodelay"); newsock 960 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_KEEPALIVE, (char *)&keepalive, sizeof(keepalive)); newsock 962 src/simh/sim_sock.c return sim_err_sock (newsock, "setsockopt KEEPALIVE"); newsock 965 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 967 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 969 src/simh/sim_sock.c sta = connect (newsock, result->ai_addr, result->ai_addrlen); newsock 978 src/simh/sim_sock.c sim_close_sock (newsock); newsock 979 src/simh/sim_sock.c newsock = INVALID_SOCKET; newsock 982 src/simh/sim_sock.c return sim_err_sock (newsock, "connect"); newsock 987 src/simh/sim_sock.c return sim_err_sock (newsock, "connect"); newsock 989 src/simh/sim_sock.c return newsock; /* got it! */ newsock 1001 src/simh/sim_sock.c SOCKET newsock; newsock 1008 src/simh/sim_sock.c newsock = accept (master, (struct sockaddr *) &clientname, &size); newsock 1009 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* error? */ newsock 1012 src/simh/sim_sock.c sim_err_sock(newsock, "accept"); newsock 1029 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 1031 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 1035 src/simh/sim_sock.c sta = sim_setnodelay (newsock); /* set nonblocking */ newsock 1037 src/simh/sim_sock.c return sim_err_sock (newsock, "setnodelay"); newsock 1041 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_KEEPALIVE, (char *)&keepalive, sizeof(keepalive)); newsock 1043 src/simh/sim_sock.c return sim_err_sock (newsock, "setsockopt KEEPALIVE"); newsock 1045 src/simh/sim_sock.c return newsock; newsock 801 src/simh/sim_tmxr.c SOCKET newsock; newsock 923 src/simh/sim_tmxr.c newsock = mp->ring_sock; newsock 929 src/simh/sim_tmxr.c newsock = sim_accept_conn_ex (mp->master, &address, (mp->packet ? SIM_SOCK_OPT_NODELAY : 0));/* poll connect */ newsock 931 src/simh/sim_tmxr.c if (newsock != INVALID_SOCKET) { /* got a live one? */ newsock 969 src/simh/sim_tmxr.c mp->ring_sock = newsock; newsock 974 src/simh/sim_tmxr.c mp->ring_sock = newsock; newsock 988 src/simh/sim_tmxr.c tmxr_msg (newsock, "No answer on any connection\r\n"); newsock 989 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 995 src/simh/sim_tmxr.c tmxr_msg (newsock, "All connections busy\r\n"); newsock 996 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 1003 src/simh/sim_tmxr.c lp->sock = newsock; /* save socket */ newsock 1008 src/simh/sim_tmxr.c sim_write_sock (newsock, (char *)mantra, sizeof(mantra)); newsock 1102 src/simh/sim_tmxr.c while (INVALID_SOCKET != (newsock = sim_accept_conn_ex (lp->master, &address, (lp->packet ? SIM_SOCK_OPT_NODELAY : 0)))) {/* got a live one? */ newsock 1105 src/simh/sim_tmxr.c sim_getnames_sock (newsock, &sockname, &peername); newsock 1115 src/simh/sim_tmxr.c tmxr_msg (newsock, "Rejecting connection from unexpected source\r\n"); newsock 1117 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 1130 src/simh/sim_tmxr.c lp->sock = newsock; /* save socket */ newsock 1134 src/simh/sim_tmxr.c sim_write_sock (newsock, (char *)mantra, sizeof(mantra)); newsock 1155 src/simh/sim_tmxr.c tmxr_msg (newsock, "Line connection not available\r\n"); newsock 1156 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 1161 src/simh/sim_tmxr.c tmxr_msg (newsock, "Line connection busy\r\n"); newsock 1162 src/simh/sim_tmxr.c sim_close_sock (newsock);