newsock 768 src/simh/sim_sock.c SOCKET newsock; newsock 771 src/simh/sim_sock.c newsock = socket (af, ((opt_flags & SIM_SOCK_OPT_DATAGRAM) ? SOCK_DGRAM : SOCK_STREAM), 0);/* create socket */ newsock 772 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 776 src/simh/sim_sock.c return newsock; newsock 778 src/simh/sim_sock.c return sim_err_sock (newsock, "socket"); /* report error and return */ newsock 780 src/simh/sim_sock.c return newsock; newsock 792 src/simh/sim_sock.c SOCKET newsock = INVALID_SOCKET; newsock 803 src/simh/sim_sock.c return newsock; newsock 813 src/simh/sim_sock.c return newsock; newsock 830 src/simh/sim_sock.c newsock = sim_create_sock (preferred->ai_family, 0); /* create socket */ newsock 831 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 846 src/simh/sim_sock.c return newsock; newsock 851 src/simh/sim_sock.c sta = setsockopt (newsock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&off, sizeof(off)); newsock 857 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)); newsock 863 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *)&on, sizeof(on)); newsock 866 src/simh/sim_sock.c sta = bind (newsock, preferred->ai_addr, preferred->ai_addrlen); newsock 869 src/simh/sim_sock.c return sim_err_sock (newsock, "bind"); newsock 871 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 873 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 875 src/simh/sim_sock.c sta = listen (newsock, 1); /* listen on socket */ newsock 877 src/simh/sim_sock.c return sim_err_sock (newsock, "listen"); newsock 878 src/simh/sim_sock.c return newsock; /* got it! */ newsock 883 src/simh/sim_sock.c SOCKET newsock = INVALID_SOCKET; newsock 917 src/simh/sim_sock.c newsock = sim_create_sock (result->ai_family, opt_flags & SIM_SOCK_OPT_DATAGRAM);/* create socket */ newsock 918 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 921 src/simh/sim_sock.c return newsock; newsock 924 src/simh/sim_sock.c sta = bind (newsock, source->ai_addr, source->ai_addrlen); newsock 929 src/simh/sim_sock.c return sim_err_sock (newsock, "bind"); newsock 933 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 934 src/simh/sim_sock.c newsock = sim_create_sock (result->ai_family, opt_flags & SIM_SOCK_OPT_DATAGRAM);/* create socket */ newsock 935 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* socket error? */ newsock 937 src/simh/sim_sock.c return newsock; newsock 942 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 945 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 949 src/simh/sim_sock.c sta = sim_setnodelay (newsock); /* set nodelay */ newsock 952 src/simh/sim_sock.c return sim_err_sock (newsock, "setnodelay"); newsock 959 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_KEEPALIVE, (char *)&keepalive, sizeof(keepalive)); newsock 961 src/simh/sim_sock.c return sim_err_sock (newsock, "setsockopt KEEPALIVE"); newsock 964 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 966 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 968 src/simh/sim_sock.c sta = connect (newsock, result->ai_addr, result->ai_addrlen); newsock 977 src/simh/sim_sock.c sim_close_sock (newsock); newsock 978 src/simh/sim_sock.c newsock = INVALID_SOCKET; newsock 981 src/simh/sim_sock.c return sim_err_sock (newsock, "connect"); newsock 986 src/simh/sim_sock.c return sim_err_sock (newsock, "connect"); newsock 988 src/simh/sim_sock.c return newsock; /* got it! */ newsock 1000 src/simh/sim_sock.c SOCKET newsock; newsock 1007 src/simh/sim_sock.c newsock = accept (master, (struct sockaddr *) &clientname, &size); newsock 1008 src/simh/sim_sock.c if (newsock == INVALID_SOCKET) { /* error? */ newsock 1011 src/simh/sim_sock.c sim_err_sock(newsock, "accept"); newsock 1028 src/simh/sim_sock.c sta = sim_setnonblock (newsock); /* set nonblocking */ newsock 1030 src/simh/sim_sock.c return sim_err_sock (newsock, "setnonblock"); newsock 1034 src/simh/sim_sock.c sta = sim_setnodelay (newsock); /* set nonblocking */ newsock 1036 src/simh/sim_sock.c return sim_err_sock (newsock, "setnodelay"); newsock 1040 src/simh/sim_sock.c sta = setsockopt (newsock, SOL_SOCKET, SO_KEEPALIVE, (char *)&keepalive, sizeof(keepalive)); newsock 1042 src/simh/sim_sock.c return sim_err_sock (newsock, "setsockopt KEEPALIVE"); newsock 1044 src/simh/sim_sock.c return newsock; newsock 765 src/simh/sim_tmxr.c SOCKET newsock; newsock 829 src/simh/sim_tmxr.c newsock = mp->ring_sock; newsock 835 src/simh/sim_tmxr.c newsock = sim_accept_conn_ex (mp->master, &address, (mp->packet ? SIM_SOCK_OPT_NODELAY : 0));/* poll connect */ newsock 837 src/simh/sim_tmxr.c if (newsock != INVALID_SOCKET) { /* got a live one? */ newsock 875 src/simh/sim_tmxr.c mp->ring_sock = newsock; newsock 880 src/simh/sim_tmxr.c mp->ring_sock = newsock; newsock 894 src/simh/sim_tmxr.c tmxr_msg (newsock, "No answer on any connection\r\n"); newsock 895 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 901 src/simh/sim_tmxr.c tmxr_msg (newsock, "All connections busy\r\n"); newsock 902 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 909 src/simh/sim_tmxr.c lp->sock = newsock; /* save socket */ newsock 914 src/simh/sim_tmxr.c sim_write_sock (newsock, (char *)mantra, sizeof(mantra)); newsock 1008 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 1011 src/simh/sim_tmxr.c sim_getnames_sock (newsock, &sockname, &peername); newsock 1021 src/simh/sim_tmxr.c tmxr_msg (newsock, "Rejecting connection from unexpected source\r\n"); newsock 1023 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 1036 src/simh/sim_tmxr.c lp->sock = newsock; /* save socket */ newsock 1040 src/simh/sim_tmxr.c sim_write_sock (newsock, (char *)mantra, sizeof(mantra)); newsock 1061 src/simh/sim_tmxr.c tmxr_msg (newsock, "Line connection not available\r\n"); newsock 1062 src/simh/sim_tmxr.c sim_close_sock (newsock); newsock 1067 src/simh/sim_tmxr.c tmxr_msg (newsock, "Line connection busy\r\n"); newsock 1068 src/simh/sim_tmxr.c sim_close_sock (newsock);