PageRenderTime 272ms queryFilters 0ms Sphinxql 66ms app.CodeModel.GetByIds 795ms findMatchingLines 53ms GetByIds 848ms meta 0ms repositoryFilters 7ms languageFilters 9ms sourceFilters 4ms

624,987 results for 'socket repo:F34140r/rockin-refbox' (272 ms)

Source

Language

Repository

socket.py https://bitbucket.org/shashank/jython | Python | 1,924 lines
379        else:
380            raise error(errno.ENOPROTOOPT, "Socket option '%s' (level '%s') not supported on socket(%s)" % \
381                (_constant_to_name(option, ['SO_', 'TCP_']), _constant_to_name(level, ['SOL_', 'IPPROTO_']), str(self.jsocket)))
1487        except error:
1488            msg = 'Problem closing socket: %s: %r' % (socket, sys.exc_info())
1489            print >> sys.stderr, msg
1579
1580socket = SocketType = _socketobject
1581
1861    def _make_ssl_socket(self, plain_socket, auto_close=0):
1862        java_net_socket = plain_socket._get_jsocket()
1863        assert isinstance(java_net_socket, java.net.Socket)
1866        factory = javax.net.ssl.SSLSocketFactory.getDefault();
1867        ssl_socket = factory.createSocket(java_net_socket, host, port, auto_close)
1868        ssl_socket.setEnabledCipherSuites(ssl_socket.getSupportedCipherSuites())
socket.c https://bitbucket.org/fatbox/pyzmq-static | C | 12,179 lines
2866 */
2867    ((struct __pyx_vtabstruct_3zmq_4core_7context_Context *)((struct __pyx_obj_3zmq_4core_6socket_Socket *)__pyx_v_self)->context->__pyx_vtab)->_remove_socket(((struct __pyx_obj_3zmq_4core_6socket_Socket *)__pyx_v_self)->context, ((struct __pyx_obj_3zmq_4core_6socket_Socket *)__pyx_v_self)->handle);
2868
4628static PyObject *__pyx_pf_3zmq_4core_6socket_6Socket_12bind(PyObject *__pyx_v_self, PyObject *__pyx_v_addr); /*proto*/
4629static char __pyx_doc_3zmq_4core_6socket_6Socket_12bind[] = "s.bind(addr)\n\n        Bind the socket to an address.\n\n        This causes the socket to listen on a network port. Sockets on the\n        other side of this connection will use ``Socket.connect(addr)`` to\n        connect to this socket.\n\n        Parameters\n        ----------\n        addr : str\n            The address string. This has the form 'protocol://interface:port',\n            for example 'tcp://127.0.0.1:5555'. Protocols supported are\n            tcp, upd, pgm, inproc and ipc. If the address is unicode, it is\n            encoded to utf-8 first.\n        ";
4630static PyObject *__pyx_pf_3zmq_4core_6socket_6Socket_12bind(PyObject *__pyx_v_self, PyObject *__pyx_v_addr) {
9518static struct PyGetSetDef __pyx_getsets_3zmq_4core_6socket_Socket[] = {
9519  {(char *)"socket_type", __pyx_getprop_3zmq_4core_6socket_6Socket_socket_type, __pyx_setprop_3zmq_4core_6socket_6Socket_socket_type, 0, 0},
9520  {(char *)"context", __pyx_getprop_3zmq_4core_6socket_6Socket_context, __pyx_setprop_3zmq_4core_6socket_6Socket_context, 0, 0},
9647  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
9648  __Pyx_DOCSTR("Socket(context, socket_type)\n\n    A 0MQ socket.\n\n    These objects will generally be constructed via the socket() method of a Context object.\n    \n    Note: 0MQ Sockets are *not* threadsafe. **DO NOT** share them across threads.\n    \n    Parameters\n    ----------\n    context : Context\n        The 0MQ Context this Socket belongs to.\n    socket_type : int\n        The socket type, which can be any of the 0MQ socket types: \n        REQ, REP, PUB, SUB, PAIR, XREQ, DEALER, XREP, ROUTER, PULL, PUSH, XPUB, XSUB.\n    \n    See Also\n    --------\n    .Context.socket : method for creating a socket bound to a Context.\n    "), /*tp_doc*/
9649  __pyx_tp_traverse_3zmq_4core_6socket_Socket, /*tp_traverse*/
10235  __pyx_vtable_3zmq_4core_6socket_Socket.send = (PyObject *(*)(struct __pyx_obj_3zmq_4core_6socket_Socket *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_3zmq_4core_6socket_6Socket_send *__pyx_optional_args))__pyx_f_3zmq_4core_6socket_6Socket_send;
10236  __pyx_vtable_3zmq_4core_6socket_Socket.recv = (PyObject *(*)(struct __pyx_obj_3zmq_4core_6socket_Socket *, int __pyx_skip_dispatch, struct __pyx_opt_args_3zmq_4core_6socket_6Socket_recv *__pyx_optional_args))__pyx_f_3zmq_4core_6socket_6Socket_recv;
10237  if (PyType_Ready(&__pyx_type_3zmq_4core_6socket_Socket) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
socket.py https://bitbucket.org/DikobrAz/motioneditor | Python | 513 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 [*]
32
33SocketType -- type object for socket objects
34error -- exception raised for I/O errors
154if sys.platform == "riscos":
155    _socketmethods = _socketmethods + ('sleeptaskw',)
156
221
222socket = SocketType = _socketobject
223
socket.cpp https://bitbucket.org/diagiman/vbox-trunk | C++ | 2,037 lines
390 */
391int rtSocketCreateForNative(RTSOCKETINT **ppSocket, RTSOCKETNATIVE hNative)
392{
432 */
433int rtSocketCreate(PRTSOCKET phSocket, int iDomain, int iType, int iProtocol)
434{
545
546RTDECL(int) RTSocketClose(RTSOCKET hSocket)
547{
831
832RTDECL(int) RTSocketRead(RTSOCKET hSocket, void *pvBuffer, size_t cbBuffer, size_t *pcbRead)
833{
1648 */
1649int rtSocketAccept(RTSOCKET hSocket, PRTSOCKET phClient, struct sockaddr *pAddr, size_t *pcbAddr)
1650{
socket.cxx https://bitbucket.org/wildcarde/conquest-dicom-server | C++ | 695 lines
69
70Socket	::	Socket ()
71	{
183		{
184		closesocket(ListenSocketfd);
185		}
639	if ( ListenSocketfd )
640		closesocket(ListenSocketfd);
641	
668	
669	Socketfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
670	if(Socketfd<0)
687		}
688	closesocket(Socketfd);
689	Socketfd = 0;
socket.py https://bitbucket.org/mikefc/pypy | Python | 615 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 [*]
97
98_realsocket = socket
99_type = type
185        # on the class '_socket.socket'.  Python 3 did it differently
186        # with a reference counter on this class 'socket._socketobject'
187        # instead, but it is a less compatible change (breaks eventlet).
268
269socket = SocketType = _socketobject
270
Socket.php https://bitbucket.org/renaatdemuynck/chamilo | PHP | 653 lines
19//
20// $Id: Socket.php 137 2009-11-09 13:24:37Z vanpouckesven $
21
24
25define('NET_SOCKET_READ', 1);
26define('NET_SOCKET_WRITE', 2);
26define('NET_SOCKET_WRITE', 2);
27define('NET_SOCKET_ERROR', 4);
28
29/**
30 * Generalized Socket class.
31 *
35 */
36class Net_Socket extends PEAR
37{
socket.py https://bitbucket.org/evjan/gevent | Python | 688 lines
112import _socket
113_realsocket = _socket.socket
114__socket__ = __import__('socket')
316
317    def close(self,_closedsocket=_closedsocket, _delegate_methods=_delegate_methods, setattr=setattr):
318        # This function should not reference any globals. See Python issue #808164.
553    def socketpair(*args):
554        one, two = _socket.socketpair(*args)
555        return socket(_sock=one), socket(_sock=two)
561    def fromfd(*args):
562        return socket(_sock=_socket.fromfd(*args))
563else:
602            # and the next bind() fails (see test__socket.TestCreateConnection)
603            # that does not happen with regular sockets though, because _socket.socket.connect() is a built-in.
604            # this is similar to "getnameinfo loses a reference" failure in test_socket.py
socket.py https://bitbucket.org/noghriw/jython | Python | 1,787 lines
330        else:
331            raise error(errno.ENOPROTOOPT, "Socket option '%s' (level '%s') not supported on socket(%s)" % (_constant_to_name(option), _constant_to_name(level), str(self.jsocket)))
332
340        else:
341            raise error(errno.ENOPROTOOPT, "Socket option '%s' (level '%s') not supported on socket(%s)" % (_constant_to_name(option), _constant_to_name(level), str(self.jsocket)))
342
1442
1443socket = SocketType = _socketobject
1444
1724    def _make_ssl_socket(self, plain_socket, auto_close=0):
1725        java_net_socket = plain_socket._get_jsocket()
1726        assert isinstance(java_net_socket, java.net.Socket)
1729        factory = javax.net.ssl.SSLSocketFactory.getDefault();
1730        ssl_socket = factory.createSocket(java_net_socket, host, port, auto_close)
1731        ssl_socket.setEnabledCipherSuites(ssl_socket.getSupportedCipherSuites())
socket.pri https://bitbucket.org/boroondas/3p-qt-open-83 | Unknown | 46 lines
2
3HEADERS += socket/qabstractsocketengine_p.h \
4           socket/qnativesocketengine_p.h \
4           socket/qnativesocketengine_p.h \
5           socket/qhttpsocketengine_p.h \
6           socket/qsocks5socketengine_p.h \
6           socket/qsocks5socketengine_p.h \
7           socket/qabstractsocket.h \
8           socket/qabstractsocket_p.h \
8           socket/qabstractsocket_p.h \
9           socket/qtcpsocket.h \
10           socket/qudpsocket.h \
27
28unix:SOURCES += socket/qnativesocketengine_unix.cpp \
29                socket/qlocalsocket_unix.cpp \
socket.py https://bitbucket.org/nicholas/gevent | Python | 706 lines
112import _socket
113_realsocket = _socket.socket
114__socket__ = __import__('socket')
334
335    def close(self,_closedsocket=_closedsocket, _delegate_methods=_delegate_methods, setattr=setattr):
336        # This function should not reference any globals. See Python issue #808164.
571    def socketpair(*args):
572        one, two = _socket.socketpair(*args)
573        return socket(_sock=one), socket(_sock=two)
579    def fromfd(*args):
580        return socket(_sock=_socket.fromfd(*args))
581else:
620            # and the next bind() fails (see test__socket.TestCreateConnection)
621            # that does not happen with regular sockets though, because _socket.socket.connect() is a built-in.
622            # this is similar to "getnameinfo loses a reference" failure in test_socket.py
socket.go git://github.com/jlatt/ergonomadic.git | Go | 95 lines
20
21func NewSocket(conn net.Conn) *Socket {
22	return &Socket{
28
29func (socket *Socket) String() string {
30	return socket.conn.RemoteAddr().String()
41
42func (socket *Socket) Read() (line string, err error) {
43	if socket.closed {
78
79	if err = socket.writer.Flush(); socket.isError(err, W) {
80		return
86
87func (socket *Socket) isError(err error, dir rune) bool {
88	if err != nil {
socket.js https://bitbucket.org/FlaiseSaffron/flaisesaffron.bitbucket.org | JavaScript | 383 lines
3 * This file needs to be copied to overwrite the file
4 * of the same name in the /lib/ folder of socket.io
5 * because a harder-to-fix bug in the client-side
11/*!
12 * socket.io-node
13 * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
28
29exports = module.exports = Socket;
30
37/**
38 * Socket constructor.
39 *
134
135Socket.prototype.to = Socket.prototype.in = function (room) {
136  this.flags.room = room;
Socket.php https://github.com/koke/flickr-commentr.git | PHP | 576 lines
19//
20// $Id: Socket.php,v 1.31 2007/05/04 04:30:29 chagenbu Exp $
21
23
24define('NET_SOCKET_READ',  1);
25define('NET_SOCKET_WRITE', 2);
25define('NET_SOCKET_WRITE', 2);
26define('NET_SOCKET_ERROR', 4);
27
28/**
29 * Generalized Socket class.
30 *
34 */
35class Net_Socket extends PEAR {
36
Socket.c https://github.com/iamaleksey/io.git | C | 479 lines
116
117void Socket_setDescriptor_(Socket *self, SOCKET_DESCRIPTOR fd)
118{
121
122SOCKET_DESCRIPTOR Socket_descriptor(Socket *self)
123{
201	u_long iToRead = 0;
202	if (ioctlsocket((SOCKET_DESCRIPTOR) fd, FIONREAD, &iToRead) == SOCKET_ERROR && SocketErrorStatus() == WSAENOTSOCK)
203#else
334	{
335		Socket *socket = Socket_new();
336		Socket_setDescriptor_(socket, d);
336		Socket_setDescriptor_(socket, d);
337		if (Socket_makeReusable(socket) && Socket_makeAsync(socket))
338			return socket;
socket.c https://github.com/niha/nihascreen.git | C | 1,779 lines
33#if !defined(NAMEDPIPE)
34#include <sys/socket.h>
35#include <sys/un.h>
98 *  fdp: pointer to store the first good socket.
99 *  nfoundp: pointer to store the number of sockets found matching.
100 *  notherp: pointer to store the number of sockets not matching.
149   * SockPath contains the socket directory.
150   * At the end of FindSocket the socket name will be appended to it.
151   * Thus FindSocket() can only be called once!
1231/*
1232 *  sequent_ptx socket emulation must have mode 000 on the socket!
1233 */
1294
1295  if ((ServerSocket = MakeServerSocket()) < 0)
1296    return 0;
socket.io.js https://github.com/BinaryFriends/Socket.IO.git | JavaScript | 1,926 lines
15		this.path = /\/$/.test(path) ? path : path + '/';
16		WEB_SOCKET_SWF_LOCATION = path + 'lib/vendor/web-socket-js/WebSocketMain.swf';
17	}
23  // WEB_SOCKET_SWF_LOCATION = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//cdn.socket.io/' + this.io.version + '/WebSocketMain.swf';
24  WEB_SOCKET_SWF_LOCATION = '/socket.io/lib/vendor/web-socket-js/WebSocketMain.swf';
25}
405		// we make sure WebSocket is not confounded with a previously loaded flash WebSocket
406		return 'WebSocket' in window && WebSocket.prototype && ( WebSocket.prototype.send && !!WebSocket.prototype.send.toString().match(/native/i)) && typeof WebSocket !== "undefined";
407	};
924	
925	Socket.prototype.addListener = Socket.prototype.addEvent = Socket.prototype.addEventListener = Socket.prototype.on;
926	
1842    if (!window.WEB_SOCKET_SWF_LOCATION) {
1843      console.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");
1844      return;
socket.c https://github.com/ser8210/PSL1GHT.git | C | 414 lines
4
5#include <sys/socket.h>
6#include <sys/select.h>
18
19#define FD(socket) (socket & ~SOCKET_FD_MASK)
20
141	if (LIBNET_INITIALIZED)
142		ret = netAccept(FD(socket), address, lenp);
143	else
143	else
144		ret = lv2NetAccept(FD(socket), address, lenp);
145
257
258int closesocket(int socket)
259{
Socket.cs https://github.com/TimGebhardt/manos.git | C# | 356 lines
13	{
14		System.Net.Sockets.Socket socket;
15		Action connectedCallback;
26
27		Socket (IOLoop loop, System.Net.Sockets.Socket socket) : this (loop)
28		{
170				SocketError err;
171				parent.socket.BeginSend (buffer.Bytes, buffer.Position, buffer.Length, SocketFlags.None, out err, ar => {
172					if (writeTimer != null) {
294		{
295			socket = new System.Net.Sockets.Socket (addr.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
296			try {
332		{
333			socket = new System.Net.Sockets.Socket (addr.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
334			try {
socket.rb https://github.com/ethansr/rubinius.git | Ruby | 1,148 lines
170    # must also be directly accessible on Socket itself. This means it's not enough
171    # to include Constants into Socket, because Socket#const_defined? must be able
172    # to see constants like AF_INET6 directly on Socket, but #const_defined? doesn't
718  def initialize(family, socket_type, protocol)
719    descriptor = Socket::Foreign.socket family, socket_type, protocol
720
796    phase = 'socket(2)'
797    sock = Socket::Foreign.socket Socket::Constants::AF_UNIX, Socket::Constants::SOCK_STREAM, 0
798
856    def socketpair(type=Socket::SOCK_STREAM, protocol=0)
857      Socket.socketpair(Socket::PF_UNIX, type, protocol, self)
858    end
1045
1046      sock = Socket::Foreign.socket family, socket_type, protocol
1047      syscall = 'socket(2)'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21