PageRenderTime 20ms queryFilters 50ms Sphinxql 115ms app.CodeModel.GetByIds 1450ms findMatchingLines 64ms GetByIds 1514ms meta 0ms repositoryFilters 14ms languageFilters 17ms sourceFilters 8ms

624,987 results for 'socket repo:love-jam/socket.io' (20 ms)

Source

Language

Repository

socket.fs https://github.com/darrylhein/gforth_webserver.git | F# | 403 lines
28\c #include <sys/socket.h>
29c-function socket socket n n n -- n ( class type proto -- fd )
30c-function closesocket close n -- n ( fd -- ior )
203
204: new-udp-socket ( -- socket )
205    PF_INET SOCK_DGRAM 0 socket
342\ converse with the server.
343: accept-socket ( lsocket -- socket )
344    16 alen !
366: write-socket ( c-addr size socket -- ) fileno -rot 0 send 0< throw ;
367: close-socket ( socket -- ) fileno closesocket drop ;
368
378: read-socket ( socket c-addr maxlen -- c-addr u )
379    utime socket-timeout-d 2@ d+ { socket c-addr maxlen d: tmax -- c-addr size }
380    BEGIN 
socket.py https://bitbucket.org/anacrolix/green380 | Python | 485 lines
7On other systems, it only supports IP. Functions specific for a
8socket are available as methods of the socket object.
9
11
12socket() -- create a new socket object
13socketpair() -- create a pair of new socket objects [*]
82
83class socket(_socket.socket):
84
136        # Issue #7995: if no default timeout is set and the listening
137        # socket had a (non-zero) timeout, force the new socket in blocking
138        # mode to override platform-specific socket flags inheritance.
288    def socketpair(family=None, type=SOCK_STREAM, proto=0):
289        """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
290
socket.py https://bitbucket.org/python_mirrors/sandbox-cjerdonek-cpython | Python | 438 lines
7On other systems, it only supports IP. Functions specific for a
8socket are available as methods of the socket object.
9
11
12socket() -- create a new socket object
13socketpair() -- create a pair of new socket objects [*]
86
87class socket(_socket.socket):
88
221
222if hasattr(_socket.socket, "share"):
223    def fromshare(info):
233    def socketpair(family=None, type=SOCK_STREAM, proto=0):
234        """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
235
socket.io.js https://bitbucket.org/tomekcejner/node-sandbox | JavaScript | 3,708 lines
1455   *
1456   * @param {Socket} socket The socket instance that needs a transport
1457   * @param {Function} fn The callback
2289    if (!Socket) {
2290      Socket = window.MozWebSocket || window.WebSocket;
2291    }
2506   *
2507   * @param {Socket} socket The socket instance that needs a transport
2508   * @param {Function} fn The callback
2825    if (!window.WEB_SOCKET_SWF_LOCATION) {
2826      console.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");
2827      return;
3464   *
3465   * @param {Socket} socket The socket instance that needs a transport
3466   * @param {Function} fn The callback
socket-options.scm https://bitbucket.org/ursetto/rfc2553 | Racket | 395 lines
186  (##sys#check-exact val where)
187  (let ((s (if (socket? s) (socket-fileno s) s)))
188    (let ((err (setsockopt/int s level name val)))
260
261;; Get socket option on socket S at socket level LEVEL with option name NAME.
262;; If len is #f (the default) it assumes the option is an integer value.
362(define-boolean-option so-broadcast? sol/socket so/broadcast)
363;(define-socket-option so-linger sol/socket so/linger set-linger-option get-linger-option)
364(define-boolean-option so-oob-inline? sol/socket so/oobinline)
368(define-integer-option so-receive-low-water sol/socket so/rcvlowat)
369;(define-socket-option so-receive-timeout sol/socket so/rcvtimeo set-timeval-option get-timeval-option)
370;(define-socket-option so-send-timeout sol/socket so/sndtimeo set-timeval-option get-timeval-option)
370;(define-socket-option so-send-timeout sol/socket so/sndtimeo set-timeval-option get-timeval-option)
371(define-socket-option  so-error sol/socket so/error set-readonly-option get-integer-option)
372(define-socket-option  so-type sol/socket so/type set-readonly-option get-integer-option)
socket.py https://bitbucket.org/python_mirrors/releasing-2.7.3 | Python | 408 lines
7On other systems, it only supports IP. Functions specific for a
8socket are available as methods of the socket object.
9
11
12socket() -- create a new socket object
13socketpair() -- create a pair of new socket objects [*]
85
86class socket(_socket.socket):
87
136        # Issue #7995: if no default timeout is set and the listening
137        # socket had a (non-zero) timeout, force the new socket in blocking
138        # mode to override platform-specific socket flags inheritance.
214    def socketpair(family=None, type=SOCK_STREAM, proto=0):
215        """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
216
socket.c https://bitbucket.org/huseby_linden/cllsd | C | 1,379 lines
208
209static socket_ret_t socket_lookup_host( socket_t * const s, 
210										int8_t const * const hostname)
558
559socket_ret_t socket_connect( socket_t* const s, 
560							 int8_t const * const hostname, 
570	CHECK_RET( VALID_SOCKET_TYPE( s->type ), SOCKET_ERROR );
571	CHECK_RET(((s->type != SOCKET_UNIX) && ((port > 0) || (s->port > 0))) || (s->type == SOCKET_UNIX), SOCKET_INVALIDPORT);
572	CHECK_RET( !socket_is_connected( s ), SOCKET_CONNECTED );
623
624socket_ret_t socket_bind( socket_t * const s,
625						  int8_t const * const host,
681
682socket_ret_t socket_listen( socket_t * const s, int const backlog )
683{
socket.html https://bitbucket.org/kokua/3p-boost-64 | HTML | 990 lines
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_asio.reference.local__stream_protocol.socket"></a><a class="link" href="socket.html" title="local::stream_protocol::socket">local::stream_protocol::socket</a>
28</h4></div></div></div>
450                  <p>
451                    <a class="link" href="../basic_stream_socket/basic_stream_socket.html" title="basic_stream_socket::basic_stream_socket"><span class="bold"><strong>basic_stream_socket</strong></span></a>
452                  </p>
898<a name="boost_asio.reference.local__stream_protocol.socket.h4"></a>
899          <span><a name="boost_asio.reference.local__stream_protocol.socket.protected_data_members"></a></span><a class="link" href="socket.html#boost_asio.reference.local__stream_protocol.socket.protected_data_members">Protected
900          Data Members</a>
948<p>
949          The <a class="link" href="../basic_stream_socket.html" title="basic_stream_socket"><code class="computeroutput"><span class="identifier">basic_stream_socket</span></code></a> class template
950          provides asynchronous and blocking stream-oriented socket functionality.
953<a name="boost_asio.reference.local__stream_protocol.socket.h5"></a>
954          <span><a name="boost_asio.reference.local__stream_protocol.socket.thread_safety"></a></span><a class="link" href="socket.html#boost_asio.reference.local__stream_protocol.socket.thread_safety">Thread
955          Safety</a>
socket.html https://bitbucket.org/kokua/3p-boost-64 | HTML | 987 lines
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_asio.reference.local__datagram_protocol.socket"></a><a class="link" href="socket.html" title="local::datagram_protocol::socket">local::datagram_protocol::socket</a>
28</h4></div></div></div>
450                  <p>
451                    <a class="link" href="../basic_datagram_socket/basic_datagram_socket.html" title="basic_datagram_socket::basic_datagram_socket"><span class="bold"><strong>basic_datagram_socket</strong></span></a>
452                  </p>
895<a name="boost_asio.reference.local__datagram_protocol.socket.h4"></a>
896          <span><a name="boost_asio.reference.local__datagram_protocol.socket.protected_data_members"></a></span><a class="link" href="socket.html#boost_asio.reference.local__datagram_protocol.socket.protected_data_members">Protected
897          Data Members</a>
945<p>
946          The <a class="link" href="../basic_datagram_socket.html" title="basic_datagram_socket"><code class="computeroutput"><span class="identifier">basic_datagram_socket</span></code></a> class template
947          provides asynchronous and blocking datagram-oriented socket functionality.
950<a name="boost_asio.reference.local__datagram_protocol.socket.h5"></a>
951          <span><a name="boost_asio.reference.local__datagram_protocol.socket.thread_safety"></a></span><a class="link" href="socket.html#boost_asio.reference.local__datagram_protocol.socket.thread_safety">Thread
952          Safety</a>
socket.html https://bitbucket.org/kokua/3p-boost-64 | HTML | 986 lines
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_asio.reference.ip__udp.socket"></a><a class="link" href="socket.html" title="ip::udp::socket">ip::udp::socket</a>
28</h4></div></div></div>
449                  <p>
450                    <a class="link" href="../basic_datagram_socket/basic_datagram_socket.html" title="basic_datagram_socket::basic_datagram_socket"><span class="bold"><strong>basic_datagram_socket</strong></span></a>
451                  </p>
894<a name="boost_asio.reference.ip__udp.socket.h4"></a>
895          <span><a name="boost_asio.reference.ip__udp.socket.protected_data_members"></a></span><a class="link" href="socket.html#boost_asio.reference.ip__udp.socket.protected_data_members">Protected
896          Data Members</a>
944<p>
945          The <a class="link" href="../basic_datagram_socket.html" title="basic_datagram_socket"><code class="computeroutput"><span class="identifier">basic_datagram_socket</span></code></a> class template
946          provides asynchronous and blocking datagram-oriented socket functionality.
949<a name="boost_asio.reference.ip__udp.socket.h5"></a>
950          <span><a name="boost_asio.reference.ip__udp.socket.thread_safety"></a></span><a class="link" href="socket.html#boost_asio.reference.ip__udp.socket.thread_safety">Thread
951          Safety</a>
socket.html https://bitbucket.org/kokua/3p-boost-64 | HTML | 989 lines
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_asio.reference.ip__tcp.socket"></a><a class="link" href="socket.html" title="ip::tcp::socket">ip::tcp::socket</a>
28</h4></div></div></div>
449                  <p>
450                    <a class="link" href="../basic_stream_socket/basic_stream_socket.html" title="basic_stream_socket::basic_stream_socket"><span class="bold"><strong>basic_stream_socket</strong></span></a>
451                  </p>
897<a name="boost_asio.reference.ip__tcp.socket.h4"></a>
898          <span><a name="boost_asio.reference.ip__tcp.socket.protected_data_members"></a></span><a class="link" href="socket.html#boost_asio.reference.ip__tcp.socket.protected_data_members">Protected
899          Data Members</a>
947<p>
948          The <a class="link" href="../basic_stream_socket.html" title="basic_stream_socket"><code class="computeroutput"><span class="identifier">basic_stream_socket</span></code></a> class template
949          provides asynchronous and blocking stream-oriented socket functionality.
952<a name="boost_asio.reference.ip__tcp.socket.h5"></a>
953          <span><a name="boost_asio.reference.ip__tcp.socket.thread_safety"></a></span><a class="link" href="socket.html#boost_asio.reference.ip__tcp.socket.thread_safety">Thread
954          Safety</a>
socket.html https://bitbucket.org/kokua/3p-boost-64 | HTML | 986 lines
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_asio.reference.ip__icmp.socket"></a><a class="link" href="socket.html" title="ip::icmp::socket">ip::icmp::socket</a>
28</h4></div></div></div>
450                  <p>
451                    <a class="link" href="../basic_raw_socket/basic_raw_socket.html" title="basic_raw_socket::basic_raw_socket"><span class="bold"><strong>basic_raw_socket</strong></span></a>
452                  </p>
895<a name="boost_asio.reference.ip__icmp.socket.h4"></a>
896          <span><a name="boost_asio.reference.ip__icmp.socket.protected_data_members"></a></span><a class="link" href="socket.html#boost_asio.reference.ip__icmp.socket.protected_data_members">Protected
897          Data Members</a>
945<p>
946          The <a class="link" href="../basic_raw_socket.html" title="basic_raw_socket"><code class="computeroutput"><span class="identifier">basic_raw_socket</span></code></a> class template
947          provides asynchronous and blocking raw-oriented socket functionality.
950<a name="boost_asio.reference.ip__icmp.socket.h5"></a>
951          <span><a name="boost_asio.reference.ip__icmp.socket.thread_safety"></a></span><a class="link" href="socket.html#boost_asio.reference.ip__icmp.socket.thread_safety">Thread Safety</a>
952        </h6>
socket.d https://bitbucket.org/tbone/gdc-fixes | D | 1,756 lines
59
60        typedef SOCKET socket_t = INVALID_SOCKET;
61        private const int _SOCKET_ERROR = SOCKET_ERROR;
1559        {
1560                //return getOption(cast(SocketOptionLevel)SocketOptionLevel.SOCKET, SocketOption.LINGER, (&result)[0 .. 1]);
1561                return getOption(level, option, (&result)[0 .. 1]);
1582        {
1583                //setOption(cast(SocketOptionLevel)SocketOptionLevel.SOCKET, SocketOption.LINGER, (&value)[0 .. 1]);
1584                setOption(level, option, (&value)[0 .. 1]);
1588        /**
1589         * Wait for a socket to change status. A wait timeout timeval or int microseconds may be specified; if a timeout is not specified or the timeval is null, the maximum timeout is used. The timeval timeout has an unspecified value when select returns. Returns the number of sockets with status changes, 0 on timeout, or -1 on interruption. If the return value is greater than 0, the SocketSets are updated to only contain the sockets having status changes. For a connecting socket, a write status change means the connection is established and it's able to send. For a listening socket, a read status change means there is an incoming connection request and it's able to accept.
1590         */
1595        //Winsock: possibly internally limited to 64 sockets per set
1596        static int select(SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, timeval* tv)
1597        in
socket.d https://bitbucket.org/tbone/gdc-fixes | D | 1,712 lines
983{
984        SOCKET =  SOL_SOCKET,           /// socket level
985        IP =      ProtocolType.IP,      /// internet protocol version 4 level
1516        {
1517                //return getOption(cast(SocketOptionLevel)SocketOptionLevel.SOCKET, SocketOption.LINGER, (&result)[0 .. 1]);
1518                return getOption(level, option, (&result)[0 .. 1]); 
1538        {
1539                //setOption(cast(SocketOptionLevel)SocketOptionLevel.SOCKET, SocketOption.LINGER, (&value)[0 .. 1]);
1540                setOption(level, option, (&value)[0 .. 1]);
1544        /**
1545         * Wait for a socket to change status. A wait timeout timeval or int microseconds may be specified; if a timeout is not specified or the timeval is null, the maximum timeout is used. The timeval timeout has an unspecified value when select returns. Returns the number of sockets with status changes, 0 on timeout, or -1 on interruption. If the return value is greater than 0, the SocketSets are updated to only contain the sockets having status changes. For a connecting socket, a write status change means the connection is established and it's able to send. For a listening socket, a read status change means there is an incoming connection request and it's able to accept.
1546         */
1641        /// ditto
1642        static int select(SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, int microseconds)
1643        {
socket.c https://bitbucket.org/ChuloChumo/sctp_thesis | C | 2,463 lines
1/*
2 * NET		An implementation of the SOCKET network access protocol.
3 *
29 *					allowed to allocate.
30 *		Linus		:	Argh. removed all the socket allocation
31 *					altogether: it's in the inode now.
267{
268	struct socket_alloc *ei = (struct socket_alloc *)foo;
269
1184		if (net_ratelimit())
1185			printk(KERN_WARNING "socket: no more sockets\n");
1186		return -ENFILE;	/* Not exactly a match, but its the
2338
2339int kernel_accept(struct socket *sock, struct socket **newsock, int flags)
2340{
socket.c https://bitbucket.org/ChuloChumo/sctp_thesis | C | 6,921 lines
1453 *
1454 *  socket  - the socket descriptor of the endpoint.
1455 *  message - pointer to the msghdr structure which contains a single
6528 * Note that sk_wmem_alloc is the sum of the send buffers on all of the
6529 * associations on the same socket.  For a UDP-style socket with
6530 * multiple associations, it is possible for it to be "unwriteable"
6533 * would cause an unwanted block under certain circumstances.  For the 1-1
6534 * UDP-style sockets or TCP-style sockets, this code should work.
6535 *  - Daisy
6741
6742	/* Migrate socket buffer sizes and all the socket level options to the
6743	 * new socket.
6885	.memory_allocated = &sctp_memory_allocated,
6886	.sockets_allocated = &sctp_sockets_allocated,
6887};
socket.c~ https://bitbucket.org/ChuloChumo/sctp_thesis | Unknown | 5,846 lines
1009	/* connect() cannot be done on a socket that is already in ESTABLISHED
1010	 * state - UDP-style peeled off socket or a TCP-style socket that
1011	 * is already connected.
5332	struct sock *sk = asoc->base.sk;
5333	struct socket *sock = sk->sk_socket;
5334
5482 * Note that sk_wmem_alloc is the sum of the send buffers on all of the
5483 * associations on the same socket.  For a UDP-style socket with
5484 * multiple associations, it is possible for it to be "unwriteable"
5487 * would cause an unwanted block under certain circumstances.  For the 1-1
5488 * UDP-style sockets or TCP-style sockets, this code should work.
5489 *  - Daisy
5669
5670	/* Migrate socket buffer sizes and all the socket level options to the
5671	 * new socket.
socket.c https://bitbucket.org/ChuloChumo/sctp_thesis | C | 5,845 lines
1008	/* connect() cannot be done on a socket that is already in ESTABLISHED
1009	 * state - UDP-style peeled off socket or a TCP-style socket that
1010	 * is already connected.
5331	struct sock *sk = asoc->base.sk;
5332	struct socket *sock = sk->sk_socket;
5333
5481 * Note that sk_wmem_alloc is the sum of the send buffers on all of the
5482 * associations on the same socket.  For a UDP-style socket with
5483 * multiple associations, it is possible for it to be "unwriteable"
5486 * would cause an unwanted block under certain circumstances.  For the 1-1
5487 * UDP-style sockets or TCP-style sockets, this code should work.
5488 *  - Daisy
5668
5669	/* Migrate socket buffer sizes and all the socket level options to the
5670	 * new socket.
Socket.java https://bitbucket.org/florent_k/these-simulateurs | Java | 473 lines
52  { 
53    TcpSocket newSocketEntity = new TcpSocket();
54    socketEntity = newSocketEntity.getProxy();
61  {
62    TcpSocket newSocketEntity = new TcpSocket(address, port);
63    socketEntity = newSocketEntity.getProxy();
79  {
80    TcpSocket newSocketEntity = new TcpSocket(address, port, localAddr, localPort);
81    socketEntity = newSocketEntity.getProxy();
96  {
97    TcpSocket newSocketEntity = new TcpSocket(host, port);
98    socketEntity = newSocketEntity.getProxy();
113  {
114    TcpSocket newSocketEntity = new TcpSocket(host, port, localAddr, localPort);
115    socketEntity = newSocketEntity.getProxy();
socket.h https://bitbucket.org/diagiman/vbox-trunk | C++ Header | 205 lines
2/** @file
3 * NAT - socket handling (declarations/defines).
4 */
41    struct socket   *so_next;
42    struct socket   *so_prev;    /* For a linked list of sockets */
43
167void so_init (void);
168struct socket * solookup (struct socket *, struct in_addr, u_int, struct in_addr, u_int);
169struct socket * socreate (void);
188 * Creates copy of UDP socket with specified addr
189 * fBindSocket - in case we want bind a real socket.
190 * @return copy of the socket with f_addr equal to u32ForeignAddr
192#ifdef VBOX_WITH_NAT_UDP_SOCKET_CLONE
193struct socket * soCloneUDPSocketWithForegnAddr(PNATState pData, bool fBindSocket, struct socket *pSo, uint32_t u32ForeignAddr);
194struct socket *soLookUpClonedUDPSocket(PNATState pData, const struct socket *pcSo, uint32_t u32ForeignAddress);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21