PageRenderTime 36ms queryFilters 2ms Sphinxql 53ms app.CodeModel.GetByIds 8ms findMatchingLines 33ms GetByIds 41ms meta 0ms repositoryFilters 29ms languageFilters 2ms sourceFilters 2ms

626,242 results for 'socket repo:markshannon/hotpy_stackless' (36 ms)

Source

Language

Repository

sock.h https://bitbucket.org/teluu/tabikphoneandroid | C++ Header | 1,263 lines
38 * The PJLIB socket abstraction layer is a thin and very portable abstraction
39 * for socket API. It provides API similar to BSD socket API. The abstraction
40 * is needed because BSD socket API is not always available on all platforms,
174 */
175/** Socket level. @see pj_SOL_SOCKET() */
176extern const pj_uint16_t PJ_SOL_SOCKET;
1011 * addrlen bytes long.  Traditionally, this is called assigning a name to
1012 * a socket. When a socket is created with #pj_sock_socket(), it exists in a
1013 * name space (address family) but has no name assigned.
1071/**
1072 * The file descriptor sockfd must refer to a socket.  If the socket is of
1073 * type PJ_SOCK_DGRAM  then the serv_addr address is the address to which
1121/**
1122 * Get socket option associated with a socket. Options may exist at multiple
1123 * protocol levels; they are always present at the uppermost socket level.
test_socket.py https://bitbucket.org/denis/eventlet | Python | 1,031 lines
22    def setUp(self):
23        self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
24        self.serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
449        # Testing getsockname()
450        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
451        sock.bind(("0.0.0.0", PORT+1))
462        # We know a socket should start without reuse==0
463        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
464        reuse = sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR)
482        # testing .family, .type and .protocol
483        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
484        self.assertEqual(sock.family, socket.AF_INET)
958        s1.listen(1)
959        s2 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
960        s2.connect(s1.getsockname())
256ia64-64n2s2c.tar.gz.output https://bitbucket.org/jsquyres/fortran-real16 | Unknown | 734 lines
4      NUMANode #0 (phys=0 local=8064400KB total=8064400KB)
5        Socket #0 (phys=0)
6          Core #0 (phys=0)
9            PU #1 (phys=1)
10        Socket #1 (phys=3)
11          Core #2 (phys=0)
15      NUMANode #1 (phys=1 local=8077312KB total=8077312KB)
16        Socket #2 (phys=512)
17          Core #4 (phys=0)
20            PU #5 (phys=5)
21        Socket #3 (phys=515)
22          Core #6 (phys=0)
26      NUMANode #2 (phys=2 local=8077312KB total=8077312KB)
27        Socket #4 (phys=1024)
28          Core #8 (phys=0)
socket.txt https://bitbucket.org/andrikmb/py3k-doc | Unknown | 887 lines
623
624   Send data to the socket.  The socket must be connected to a remote socket.  The
625   optional *flags* argument has the same meaning as for :meth:`recv` above.
632
633   Send data to the socket.  The socket must be connected to a remote socket.  The
634   optional *flags* argument has the same meaning as for :meth:`recv` above.
764   PORT = 50007              # Arbitrary non-privileged port
765   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
766   s.bind((HOST, PORT))
782   PORT = 50007              # The same port as used by the server
783   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
784   s.connect((HOST, PORT))
872   # create a raw socket and bind it to the public interface
873   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
874   s.bind((HOST, 0))
lhttpc_client.erl https://bitbucket.org/tamasnagy/lhttpc | Erlang | 637 lines
106    SocketRequest = {socket, self(), Host, Port, Ssl},
107    Socket = case gen_server:call(lhttpc_manager, SocketRequest, infinity) of
108        {ok, S}   -> S; % Re-using HTTP/1.1 connections
118        request_headers = Hdrs,
119        socket = Socket,
120        connect_timeout = proplists:get_value(connect_timeout, Options,
216
217send_body_part(State = #client_state{socket = Socket, ssl = Ssl}, BodyPart) ->
218    Data = encode_body_part(State, BodyPart),
263            ReqHdrs = State#client_state.request_headers,
264            NewSocket = maybe_close_socket(Socket, Ssl, Vsn, ReqHdrs, NewHdrs),
265            {Response, NewSocket};
626    end;
627maybe_close_socket(Socket, Ssl, _, ReqHdrs, RespHdrs) ->
628    ClientConnection = ?CONNECTION_HDR(ReqHdrs, "keep-alive"),
socket.scm https://bitbucket.org/ebb/scheme48 | Lisp | 349 lines
70  (cond
71   ((or (socket-input-port socket) (socket-output-port socket))
72    (cond 
129	 (newsock (channel->socket (socket-address-family socket)
130				   (socket-socket-type socket)
131				   channel)))
168(define (shutdown-socket socket how)
169  (shutdown-socket-channel (socket-channel socket) how))
170
285(define (socket-ipv6-join-group! socket address interface)
286  (external-ipv6-socket-join-group (socket-channel socket)
287				   (socket-address-raw address)
293(define (socket-ipv6-leave-group! socket address interface)
294  (external-ipv6-socket-leave-group (socket-channel socket)
295				    (socket-address-raw address)
address.scm https://bitbucket.org/ebb/scheme48 | Lisp | 483 lines
138
139(define-record-type socket-address-data/ipv4 :socket-address-data/ipv4
140  (make-socket-address-data/ipv4 address port)
334  unknown-socket-type :unknown-socket-type
335  make-unknown-socket-type unknown-socket-type? unknown-socket-type-number
336  100
336  100
337  socket-type? socket-type->raw raw->socket-type)
338
343  (family address-info-family)
344  (socket-type address-info-socket-type)
345  (protocol address-info-protocol)
346  (canonical-name address-info-canonical-name)
347  (socket-address address-info-socket-address))
348
FGOutput.cpp https://bitbucket.org/tomp/fg-test | C++ | 1,128 lines
3512/02/98   JSB   Created
3611/09/07   HDW   Added FlightGear Socket Interface
37
150  delete socket;
151  delete flightGearSocket;
152  OutputProperties.clear();
961    port = atoi(document->GetAttributeValue("port").c_str());
962    socket = new FGfdmSocket(name, port);
963  } else if (!document->GetAttributeValue("port").empty() && type == string("FLIGHTGEAR")) {
967    if (protocol == "udp")
968       flightGearSocket = new FGfdmSocket(name, port, FGfdmSocket::ptUDP);  // create udp socket
969    else
969    else
970       flightGearSocket = new FGfdmSocket(name, port, FGfdmSocket::ptTCP);  // create tcp socket (default)
971  } else {
test_socket.py https://bitbucket.org/lericson/gevent | Python | 1,038 lines
25    def setUp(self):
26        self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
27        self.serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
460        # Testing getsockname()
461        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
462        sock.bind(("0.0.0.0", PORT+1))
473        # We know a socket should start without reuse==0
474        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
475        reuse = sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR)
495        # testing .family, .type and .protocol
496        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
497        self.assertEqual(sock.family, socket.AF_INET)
965        s1.listen(1)
966        s2 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
967        s2.connect(s1.getsockname())
socket.h https://bitbucket.org/kcwu/xchm-base | C++ Header | 1,337 lines
182*/
183class wxSocketServer : public wxSocketBase
184{
285    */
286    wxSocketClient(wxSocketFlags flags = wxSOCKET_NONE);
287
468
469    @see wxSocketBase, wxSocketClient, wxSocketServer
470*/
655
656    @see wxSocketEvent, wxSocketClient, wxSocketServer, @sample{sockets},
657         @ref wxSocketFlags, ::wxSocketEventFlags, ::wxSocketError
1296*/
1297class wxDatagramSocket : public wxSocketBase
1298{
sj3v2-socket.scm https://bitbucket.org/ohac/uim | Lisp | 444 lines
1;;; sj3v2-socket.scm: SJ3 protocol version 2 for uim.
2;;;
61    (2   . (N_ "Cannot open socket."))       ;; SJ3_OpenSocket
62    (3   . (N_ "Cannot connect socket."))    ;; SJ3_ConnectSocket
63    (4   . (N_ "Unknown hostname."))         ;; SJ3_GetHostByName
115;; helper functions
116(define (sj3-lib-get-string-with-terminate socket)
117  (let loop ((c (file-read socket 1))
124          (else
125           (loop (file-read socket 1) (cons (car c) rest))))))
126
130;;
131(define (sj3-lib-connect socket user)
132  (file-write socket
375        (tcp-connect server-name 3086)
376        (unix-domain-socket-connect sj3-unix-domain-socket-path))))
377
greenio_test.py https://bitbucket.org/which_linden/eventlet-libevent | Python | 313 lines
92        
93        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
94        server.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
182            
183            listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
184            listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
249            eventlet.exc_after(0.01, eventlet.TimeoutError)
250            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
251            client.connect(('127.0.0.1', bound_port))
281        results2 = []
282        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
283        listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
299        server_coro = eventlet.spawn(server)
300        client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
301        client.connect(('127.0.0.1', listener.getsockname()[1]))
greenio_test.py https://bitbucket.org/patcarlisle/eventlet | Python | 313 lines
92        
93        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
94        server.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
182            
183            listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
184            listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
249            eventlet.Timeout(0.01)
250            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
251            client.connect(('127.0.0.1', bound_port))
281        results2 = []
282        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
283        listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
299        server_coro = eventlet.spawn(server)
300        client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
301        client.connect(('127.0.0.1', listener.getsockname()[1]))
greenio_test.py https://bitbucket.org/jmalicki/eventlet | Python | 417 lines
94        
95        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
96        server.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
251            eventlet.Timeout(0.01)
252            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
253            client.connect(('127.0.0.1', bound_port))
283        results2 = []
284        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
285        listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
303        server_coro = eventlet.spawn(server)
304        client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
305        client.connect(('127.0.0.1', listener.getsockname()[1]))
334
335        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
336        listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
greenio_test.py https://bitbucket.org/creiht/eventlet | Python | 524 lines
255        def did_it_work(server):
256            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
257            client.connect(('127.0.0.1', server.getsockname()[1]))
263            
264        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
265        server.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
309        large_data = '*' * 10 * min_buf_size()
310        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
311        listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
428            eventlet.Timeout(0.01)
429            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
430            client.connect(('127.0.0.1', bound_port))
492        results2 = []
493        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
494        listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
greenio_test.py https://bitbucket.org/chrisatlee/eventlet | Python | 582 lines
61    def test_connect_ex_timeout(self):
62        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
63        s.settimeout(0.1)
259        def did_it_work(server):
260            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
261            client.connect(('127.0.0.1', server.getsockname()[1]))
267
268        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
269        server.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
432            eventlet.Timeout(0.01)
433            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
434            client.connect(('127.0.0.1', bound_port))
497        results2 = []
498        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
499        listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
greenio_test.py https://bitbucket.org/asvetlov/eventlet | Python | 345 lines
92        
93        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
94        server.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
182            
183            listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
184            listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
249            eventlet.Timeout(0.01)
250            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
251            client.connect(('127.0.0.1', bound_port))
313        results2 = []
314        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
315        listener.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
331        server_coro = eventlet.spawn(server)
332        client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
333        client.connect(('127.0.0.1', listener.getsockname()[1]))
lhttpc_client.erl https://bitbucket.org/zajda/lhttpc | Erlang | 686 lines
120                                                    ),
121    SocketRequest = {socket, self(), SocketHost, SocketPort, Ssl},
122    Socket = case gen_server:call(lhttpc_manager, SocketRequest, infinity) of
192                                                    ),
193    case lhttpc_sock:connect(SocketHost, SocketPort, SocketOptions, Timeout, Ssl) of
194        {ok, Socket} ->
244
245send_body_part(State = #client_state{socket = Socket, ssl = Ssl}, BodyPart) ->
246    Data = encode_body_part(State, BodyPart),
299            ReqHdrs = State#client_state.request_headers,
300            NewSocket = maybe_close_socket(Socket, Ssl, Vsn, ReqHdrs, NewHdrs),
301            {Response, NewSocket};
661    end;
662maybe_close_socket(Socket, Ssl, _, ReqHdrs, RespHdrs) ->
663    ClientConnection = ?CONNECTION_HDR(ReqHdrs, "keep-alive"),
events.txt https://bitbucket.org/dpaulus/ircu-patchq-base | Unknown | 817 lines
78Perhaps the most complicated event generator in all of the event
79system is the socket, as described by struct Socket.  This single
80classification covers datagram sockets and stream sockets.  To
80classification covers datagram sockets and stream sockets.  To
81differentiate the different kinds of sockets, there is a socket state
82associated with each socket.  The available states are SS_CONNECTING,
222<typedef>
223typedef void (*EngineState)(struct Socket*, enum SocketState new_state);
224
498<function>
499void socket_state(struct Socket* sock, enum SocketState state);
500
724<function>
725struct Socket* ev_socket(struct Event* ev);
726
socket.txt https://bitbucket.org/ymotongpoo/jython25_ja | Unknown | 911 lines
173   Many constants of these forms, documented in the Unix documentation
174   on sockets and/or the IP protocol, are also defined in the socket
175   module. They are generally used in arguments to the
792   PORT = 50007              # Arbitrary non-privileged port
793   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
794   s.bind((HOST, PORT))
808   PORT = 50007              # The same port as used by the server
809   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
810   s.connect((HOST, PORT))
864   s = None
865   for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM):
866       af, socktype, proto, canonname, sa = res
896   # create a raw socket and bind it to the public interface
897   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
898   s.bind((HOST, 0))
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21