PageRenderTime 18ms queryFilters 145ms Sphinxql 201ms app.CodeModel.GetByIds 1575ms findMatchingLines 55ms GetByIds 1630ms meta 0ms repositoryFilters 3ms languageFilters 0ms sourceFilters 2ms

624,987 results for 'socket repo:georg199041/ang-tree' (18 ms)

Source

Language

Repository

acl-socket.lisp https://bitbucket.org/mt/biobike | Lisp | 175 lines
19
20(defmethod print-object ((server-socket server-socket) stream)
21  (print-unreadable-object (server-socket stream :type t :identity nil)
35  (when (cond ((numberp wait)
36               (socket-wait (clisp-socket-server server-socket) wait))
37              (wait (socket-wait (clisp-socket-server server-socket)))
37              (wait (socket-wait (clisp-socket-server server-socket)))
38              (t (socket-wait (clisp-socket-server server-socket) 0)))
39    (let ((stream (socket-accept (clisp-socket-server server-socket)
76  (declare (ignore abort))
77  (socket-server-close (clisp-socket-server server-socket)))
78
136  (dotted-to-ipaddr
137   (nth-value 0 (socket-stream-peer (get-clisp-stream socket-stream) t))))
138
big-socket.scm https://bitbucket.org/ebb/scheme48 | Lisp | 78 lines
5; Server interface
6;   (open-socket [socket-number]) -> socket
7;   (close-socket socket)
7;   (close-socket socket)
8;   (socket-accept socket) -> [input-port output-port]
9;   (get-host-name) -> string
9;   (get-host-name) -> string
10;   (socket-port-number socket) -> integer
11
12; Client interface
13;   (socket-client host-name socket-number) -> [input-port output-port]
14
35			      (socket-type stream))))
36    (socket-connect socket
37		    (make-ipv4-socket-address address port))
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
socket.py https://bitbucket.org/jjonte/gevent | Python | 661 lines
29
30For convenience, exceptions (like :class:`error <socket.error>` and :class:`timeout <socket.timeout>`)
31as well as the constants from :mod:`socket` module are imported into this module.
82timeout = _socket.timeout
83_realsocket = _socket.socket
84__socket__ = __import__('socket')
93
94# Import public constants from the standard socket (called __socket__ here) into this module.
95
452        try:
453            descriptor.setsockopt(SOL_SOCKET, SO_REUSEADDR, descriptor.getsockopt(SOL_SOCKET, SO_REUSEADDR) | 1)
454        except error:
470    try:
471        descriptor.setsockopt(SOL_SOCKET, SO_REUSEADDR, descriptor.getsockopt(SOL_SOCKET, SO_REUSEADDR) | 1)
472    except error:
socket.js https://bitbucket.org/activestate/komodo-3rdparty | JavaScript | 422 lines
6// To cope with versions incompatibilities, we define this:
7// sv.socket.svSocketMinVersion  // minimal svSocket R package version required
8//
27// sv.socket.serverConfig();    // Get a short description of server config
28// sv.socket.serverWrite(data); // Write a string through the socket server
29// sv.socket.updateCharset(force); // Update R character set
223					if (this.debug)
224						sv.log.debug("Socket server: onSocketAccepted!");
225
254					} catch (e) {
255						sv.log.exception(e, "Socket server: onSocketAccepted()" +
256							" is unable to convert to Unicode");
294				} catch(e) {
295					sv.log.exception(e, "Socket server: onSocketAccepted()," +
296						" unmanaged error");
socket.d https://bitbucket.org/repeatedly/scrap | D | 2,693 lines
1696{
1697    SOCKET = SOL_SOCKET,         /// socket level
1698    IP     = ProtocolType.IP,    /// internet protocol version 4 level
2243    {
2244        //return getOption(cast(SocketOptionLevel)SocketOptionLevel.SOCKET, SocketOption.LINGER, (&result)[0 .. 1]);
2245        return getOption(level, option, (&result)[0 .. 1]);
2272    {
2273        //setOption(cast(SocketOptionLevel)SocketOptionLevel.SOCKET, SocketOption.LINGER, (&value)[0 .. 1]);
2274        setOption(level, option, (&value)[0 .. 1]);
2291     */
2292    static int select(SocketSet!(Socket) checkRead, SocketSet!(Socket) checkWrite, SocketSet!(Socket) checkError, Timeout* timeout = null)
2293    in
2352    /// ditto
2353    static int select(SocketSet!(Socket) checkRead, SocketSet!(Socket) checkWrite, SocketSet!(Socket) checkError, int microseconds)
2354    {
Socket.h https://bitbucket.org/rosselm/projects | C++ Header | 611 lines
53	/// Socket is the common base class for
54	/// StreamSocket, ServerSocket, DatagramSocket and other
55	/// socket classes.
72
73	Socket(const Socket& socket);
74		/// Copy constructor.
78		
79	Socket& operator = (const Socket& socket);
80		/// Assignment operator.
112
113	static int select(SocketList& readList, SocketList& writeList, SocketList& exceptList, const Poco::Timespan& timeout);
114		/// Determines the status of one or more sockets, 
320//
321inline bool Socket::operator == (const Socket& socket) const
322{
socket.py https://bitbucket.org/op/gevent | Python | 717 lines
29
30For convenience, exceptions (like :class:`error <socket.error>` and :class:`timeout <socket.timeout>`)
31as well as the constants from :mod:`socket` module are imported into this module.
84timeout = _socket.timeout
85_realsocket = _socket.socket
86__socket__ = __import__('socket')
89
90# Import public constants from the standard socket (called __socket__ here) into this module.
91
549        one, two = _socket.socketpair(*args)
550        return socket(_sock=one), socket(_sock=two)
551else:
555    def fromfd(*args):
556        return socket(_sock=_socket.fromfd(*args))
557else:
socket.py https://bitbucket.org/andrix/gevent | Python | 745 lines
106import _socket
107_realsocket = _socket.socket
108__socket__ = __import__('socket')
337            wait_read(sock.fileno(), timeout=self.timeout, event=self._read_event)
338        return socket(_sock=client_socket), address
339
574        one, two = _socket.socketpair(*args)
575        return socket(_sock=one), socket(_sock=two)
576else:
581    def fromfd(*args):
582        return socket(_sock=_socket.fromfd(*args))
583else:
589        try:
590            descriptor.setsockopt(SOL_SOCKET, SO_REUSEADDR, descriptor.getsockopt(SOL_SOCKET, SO_REUSEADDR) | 1)
591        except error:
Socket.cpp https://bitbucket.org/clb/knet | C++ | 964 lines
119
120Socket::Socket(SOCKET connection, const EndPoint &localEndPoint_, const char *localHostName_,
121	const EndPoint &remoteEndPoint_, const char *remoteHostName_, 
322		{
323			LOG(LogError, "Socket::EnqueueNewReceiveBuffer: %s for overlapped socket %s failed! Error: %s.", IsUDPServerSocket() ? "WSARecvFrom" : "WSARecv", ToString().c_str(), Network::GetErrorString(error).c_str());
324
364
365	if (IsUDPSlaveSocket()) // UDP slave sockets are never read directly. Instead the UDP server socket reads all client data.
366		return 0; // So, if we accidentally come here to read a UDP slave socket, act as if it never received any data.
428{
429	if (IsUDPSlaveSocket()) // UDP slave sockets are never read directly. For these sockets, act as if they're never ready for reads.
430		return false;
631		// For UDP client sockets on the server side, the same SOCKET object is shared by 
632		// all other client sockets and the UDP server socket. For those sockets, the UDP server socket is the owner
633		// of the socket object, so the clients cannot close their sockets, as closing one would close them all.
Socket.h https://bitbucket.org/clb/knet | C++ Header | 343 lines
86	ServerListenSocket, ///< For TCP: a listen socket. For UDP: the single master socket handle that is used to send & receive all data.
87	ServerClientSocket, ///< For TCP: a client data socket. For UDP: a slave-mode Socket object that shares the underlying socket handle with the UDP master Socket.
88	ClientSocket ///< A client-side socket.
161	/// each new connection, like is done with TCP.
162	bool IsUDPServerSocket() const { return transport == SocketOverUDP && type == ServerListenSocket; }
163	/// Returns whether this socket is a UDP slave socket. [worker thread]
163	/// Returns whether this socket is a UDP slave socket. [worker thread]
164	bool IsUDPSlaveSocket() const { return transport == SocketOverUDP && type == ServerClientSocket; }
165
257	/// Returns the remote EndPoint this socket is connected to.
258	/// If SocketType == ServerListenSocket, this socket is not bound
259	/// to any remote end point, and so the returned struct is uninitialized (filled with zeroes).
296	/// Specifies the remote system end point (IP and port) this socket is bound to (== the "peer" address).
297	/// If SocketType == ServerListenSocket or transport == SocketOverUDP, this socket is not bound
298	/// to any remote end point, and so this struct is uninitialized (filled with zeroes).
socket.c https://bitbucket.org/zossso/android-kernel-2.6.34-motus | C | 3,153 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.
278{
279	struct socket_alloc *ei = (struct socket_alloc *)foo;
280
1219		if (net_ratelimit())
1220			printk(KERN_WARNING "socket: no more sockets\n");
1221		return -ENFILE;	/* Not exactly a match, but its the
3028
3029int kernel_accept(struct socket *sock, struct socket **newsock, int flags)
3030{
socket.py git://github.com/zeromq/pyzmq.git | Python | 758 lines
13import zmq
14from zmq.backend import Socket as SocketBase
15from .poll import Poller
42
43class Socket(SocketBase, AttributeSetter):
44    """The ZMQ socket object
113    def socket_type(self):
114        warnings.warn("Socket.socket_type is deprecated, use Socket.type",
115            DeprecationWarning
743        # create new PAIR socket and connect it
744        self._monitor_socket = self.context.socket(zmq.PAIR)
745        self._monitor_socket.connect(addr)
748    def disable_monitor(self):
749        """Shutdown the PAIR socket (created using get_monitor_socket)
750        that is serving socket events.
socket.7 https://github.com/nohappiness/manpages-zh.git | Unknown | 558 lines
16.SH NAME
17socket - Linux socket interface
18.SH SYNOPSIS
20.br
21.IB mysocket " = socket(int " socket_family ", int " socket_type ", int " protocol );
22
49.BR connect (2)
50connects a socket to a remote socket address,
51the 
269only packets received from that particular interface are processed by the 
270socket. Note that this only works for some socket types, particularly
271.B AF_INET
271.B AF_INET
272sockets. It is not supported for packet sockets (use normal 
273.BR bind (8)
socket.io.js git://github.com/kripken/emscripten.git | JavaScript | 3,870 lines
1479   *
1480   * @param {Socket} socket The socket instance that needs a transport
1481   * @param {Function} fn The callback
2919    if (!window.WEB_SOCKET_SWF_LOCATION) {
2920      console.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");
2921      return;
3235          usesXDomReq = (global.XDomainRequest && request instanceof XDomainRequest),
3236          socketProtocol = (socket && socket.options && socket.options.secure ? 'https:' : 'http:'),
3237          isXProtocol = (global.location && socketProtocol != global.location.protocol);
3582   *
3583   * @param {Socket} socket The socket instance that needs a transport
3584   * @param {Function} fn The callback
3814   *
3815   * @param {Socket} socket The socket instance that needs a transport
3816   * @param {Function} fn The callback
socket.py https://bitbucket.org/pombredanne/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.js https://bitbucket.org/sasha.firsov/dojoplay2012 | JavaScript | 222 lines
20	//		| dojo.require("dojox.socket");
21	//		| var socket = dojox.socket({"//comet-server/comet");
22	//		| // we could also add auto-reconnect support
37	//		| // add auto-reconnect support
38	//		| socket = dojox.socket.Reconnect(socket);
39	if(typeof argsOrUrl == "string"){
41	}
42	return WebSocket ? dojox.socket.WebSocket(argsOrUrl, true) : dojox.socket.LongPoll(argsOrUrl);
43};
66};
67Socket.replace = function(socket, newSocket, listenForOpen){
68	// make the original socket a proxy for the new socket
76	function proxyEvent(type){
77		(newSocket.addEventListener || newSocket.on).call(newSocket, type, function(event){
78			var newEvent = document.createEvent("MessageEvent");
function.socket-get-option.html https://github.com/urevic/dotfiles.git | HTML | 532 lines
15  <h1 class="refname">socket_get_option</h1>
16  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">socket_get_option</span> &mdash; <span class="dc-title">Gets socket options for the socket </span></p>
17
47      <p class="para">
48       A valid socket resource created with <span class="function"><a href="function.socket-create.html" class="function">socket_create()</a></span>
49       or <span class="function"><a href="function.socket-accept.html" class="function">socket_accept()</a></span>.
141            In the case of a connection-oriented socket, 
142            <span class="function"><a href="function.socket-close.html" class="function">socket_close()</a></span> will wait for its peer to
143            acknowledge the data. 
485<div class="phpcode"><code><span style="color: #000000">
486<span style="color: #0000BB">&lt;?php<br />$socket&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">socket_create_listen</span><span style="color: #007700">(</span><span style="color: #0000BB">1223</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$linger&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">'l_linger'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'l_onoff'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">socket_set_option</span><span style="color: #007700">(</span><span style="color: #0000BB">$socket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SOL_SOCKET</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SO_LINGER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$linger</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">socket_get_option</span><span style="color: #007700">(</span><span style="color: #0000BB">$socket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SOL_SOCKET</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SO_REUSEADDR</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
487</span>
527 <div class="prev" style="text-align: left; float: left;"><a href="function.socket-create.html">socket_create</a></div>
528 <div class="next" style="text-align: right; float: right;"><a href="function.socket-getpeername.html">socket_getpeername</a></div>
529 <div class="up"><a href="ref.sockets.html">Socket Functions</a></div>
socket.rb git://github.com/chuckremes/ffi-rzmq.git | Ruby | 611 lines
22    #
23    # Creation of a new Socket object can return nil when socket creation
24    # fails.
25    #
26    #  if (socket = Socket.new(context.pointer, ZMQ::REQ))
27    #    ...
59    #  begin
60    #    socket = Socket.new(context.pointer, ZMQ::REQ)
61    #  rescue ContextError => e
75        @socket = LibZMQ.zmq_socket context_ptr, type
76        if @socket && !@socket.null?
77          @name = SocketTypeNameMap[type]
78        else
79          raise ContextError.new 'zmq_socket', 0, ETERM, "Socket pointer was null"
80        end
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21