PageRenderTime 430ms queryFilters 0ms Sphinxql 67ms app.CodeModel.GetByIds 248ms findMatchingLines 78ms GetByIds 326ms meta 0ms repositoryFilters 9ms languageFilters 3ms sourceFilters 4ms

626,242 results for 'socket repo:mba811/twenty' (430 ms)

Source

Language

Repository

redisclient.h https://github.com/lovemychobits/c2p_server.git | C++ Header | 3,197 lines
1106    {
1107      int socket = get_socket(key);
1108      send_(socket, makecmd("EXPIRE") << key << secs);
2204    {
2205      int socket = get_socket(channel);
2206      
2388        int cur_socket = get_socket(keys[i]);
2389        if(i > 0 && socket != cur_socket)
2390          return -1;
2392        
2393        socket = cur_socket;
2394      }
2564        
2565          // Now read from the socket to remove the peeked data from the socket's
2566          // read buffer.  This will not block since we've peeked already and know
test_socket_options.cpp https://github.com/murrekatt/zmqpp.git | C++ | 288 lines
14#define STRINGIFY(x) #x
15#define CHECK_SET(socket, type, option) check_set<type>(socket, zmqpp::socket_option::option, STRINGIFY(option), false)
16#define CHECK_SET_POSITIVE(socket, type, option) check_set<type>(socket, zmqpp::socket_option::option, STRINGIFY(option), true)
16#define CHECK_SET_POSITIVE(socket, type, option) check_set<type>(socket, zmqpp::socket_option::option, STRINGIFY(option), true)
17#define CHECK_GET(socket, type, option) check_get<type>(socket, zmqpp::socket_option::option, STRINGIFY(option))
18
19// Note the hacky abuse of the fact we don't have float options
20#define CHECK_NOSET(socket, option) check_set<float>(socket, zmqpp::socket_option::option, STRINGIFY(option), false)
21#define CHECK_NOGET(socket, option) check_get<float>(socket, zmqpp::socket_option::option, STRINGIFY(option))
62template<typename Type>
63void check_set(zmqpp::socket& socket, zmqpp::socket_option const& option, std::string const& option_name, bool positive_only)
64{
220	zmqpp::context context;
221	zmqpp::socket socket(context, zmqpp::socket_type::subscribe);
222	socket.bind("inproc://test");
socket.io.js https://github.com/eheb/socket.io.git | JavaScript | 1,384 lines
187        request(srv)
188        .get('/socket.io/socket.io.js')
189        .end(function(err, res){
422          sio.of('/news', function(socket){
423            expect(socket).to.be.a(Socket);
424            --total || done();
1244  describe('middleware', function(done){
1245    var Socket = require('../lib/socket');
1246
1251      sio.use(function(socket, next){
1252        expect(socket).to.be.a(Socket);
1253        run++;
1256      sio.use(function(socket, next){
1257        expect(socket).to.be.a(Socket);
1258        run++;
server_select.lua https://github.com/murnko/prosody.git | Lua | 1,017 lines
51local has_luasec, luasec = pcall ( require , "ssl" )
52local luasocket = use "socket" or require "socket"
53local luasocket_gettime = luasocket.gettime
129_timerlist = { } -- array of timer functions
130_socketlist = { } -- key = socket, value = wrapped socket (handlers)
131_readtimes = { } -- key = handler, value = timestamp of last data reading
524			bufferlen = 0
525			_sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) -- delete socket from writelist
526			_writetimes[ handler ] = nil
601			local oldsocket, err = socket
602			socket, err = ssl_wrap( socket, sslctx )	-- wrap socket
603			if not socket then
670
671removesocket = function( list, socket, len )	-- this function removes sockets from a list ( copied from copas )
672	local pos = list[ socket ]
messagereader.cc https://github.com/dreibh/netperfmeter.git | C++ | 306 lines
48      Socket* socket = iterator->second;
49      deregisterSocket(socket->SocketDescriptor);
50      iterator = SocketMap.begin();
83   printf("RegisterSocket: UseCount[sd=%d,proto=%d]=%u\n",
84          socket->SocketDescriptor, socket->Protocol, (unsigned int)socket->UseCount);
85#endif
94   size_t count = 0;
95   for(std::map<int, Socket*>::iterator iterator = SocketMap.begin(); iterator != SocketMap.end(); iterator++) {
96      sds[count++] = iterator->second->SocketDescriptor;
110      printf("DeregisterSocket: UseCount[sd=%d,proto=%d]=%u\n",
111             socket->SocketDescriptor, socket->Protocol, (unsigned int)socket->UseCount);
112#endif
133{
134   Socket* socket = getSocket(sd);
135   if(socket != NULL) {
tcp.py https://github.com/qzem/hortonworks-sandbox.git | Python | 1,034 lines
532    def setTcpNoDelay(self, enabled):
533        self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, enabled)
534
539    def setTcpKeepAlive(self, enabled):
540        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, enabled)
541
600        """
601        s = socket.socket(self.addressFamily, self.socketType)
602        s.setblocking(0)
628
629        err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
630        if err:
843        if platformType == "posix" and sys.platform != "cygwin":
844            s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
845        return s
emulcomm.py https://github.com/aaaaalbert/repy_v2.git | Python | 2,240 lines
161    for ip in allowed_list:
162      sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
163      try:
702  # Open a socket
703  sockobj = socket.socket(socket.AF_INET, connection_type)
704
1447  # Create the TCP socket
1448  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  
1449  # Reuse the socket if it's "pseudo-availible"
1449  # Reuse the socket if it's "pseudo-availible"
1450  s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
1451
1466  # Create the UDP socket
1467  s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
1468  if localip and localport:
qabstractsocket.cpp https://code.google.com/p/phantomjs/ | C++ | 3,004 lines
730#ifndef QT_NO_UDPSOCKET
731        || (!isBuffered && socketType != QAbstractSocket::TcpSocket && socketEngine && socketEngine->hasPendingDatagrams())
732#endif
1358
1359QAbstractSocketEngine* QAbstractSocketPrivate::getSocketEngine(QAbstractSocket *socket)
1360{
1376    qDebug("QAbstractSocket::QAbstractSocket(%sSocket, QAbstractSocketPrivate == %p, parent == %p)",
1377           socketType == TcpSocket ? "Tcp" : socketType == UdpSocket
1378           ? "Udp" : "Unknown", &dd, parent);
1842*/
1843bool QAbstractSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState socketState,
1844                                          OpenMode openMode)
1936*/
1937QVariant QAbstractSocket::socketOption(QAbstractSocket::SocketOption option)
1938{
Bug106-ReadingInputData.txt git://github.com/ademar/suave.git | text | 362 lines
143---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
144   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
145   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
251System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
252   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
253   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
270---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
271   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
272   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
310System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
311   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
312   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
329---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
330   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
331   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
Bug105-StopsResponding.verbose.txt git://github.com/ademar/suave.git | text | 1,964 lines
78[V] 2014-05-01T11:45:01.5966990Z: 127.0.0.1 connected, total: 1 clients [Tcp.tcp_ip_server]
79[V] 2014-05-01T11:45:01.5966990Z: reserving buffer: 811008 [Socket.BufferManager]
80
90[V] 2014-05-01T11:45:02.0172386Z: reserving buffer: 794624 [Socket.BufferManager]
91[V] 2014-05-01T11:45:02.0172386Z: freeing buffer: 794624 [Socket.BufferManager]
92[V] 2014-05-01T11:45:02.0172386Z: <- processor [Web.request_loop.loop]
95>
96[V] 2014-05-01T11:45:02.0172386Z: freeing buffer: 811008 [Socket.BufferManager]
97[V] 2014-05-01T11:45:02.0172386Z: 127.0.0.1 disconnected, total: 0 clients [Tcp.tcp_ip_server]
1931[V] 2014-05-01T11:46:25.7285541Z: 127.0.0.1 disconnected, total: 0 clients [Tcp.tcp_ip_server]
1932System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
1933   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
1951---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
1952   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
1953   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
README.md git://github.com/alecthomas/gozmq.git | Markdown | 1,024 lines
349```go
350func (c *Context) NewSocket(t SocketType) (*Socket, error)
351```
405type PollItem struct {
406  Socket  *Socket         // socket to poll for events on
407  Fd      ZmqOsSocketType // fd to poll for events on as returned from os.File.Fd()
808```go
809func (s *Socket) SetSockOptInt(option IntSocketOption, value int) error
810```
983```go
984func (s *Socket) Type() (SocketType, error)
985```
1020```go
1021func (self ZmqOsSocketType) ToRaw() C.SOCKET
1022```
zmqgen_4_0.go git://github.com/alecthomas/gozmq.git | Go | 627 lines
11
12// Socket Option Getters
13
13
14// ZMQ_TYPE: Retrieve socket type.
15//
17//
18func (s *Socket) Type() (SocketType, error) {
19	value, err := s.GetSockOptUInt64(TYPE)
19	value, err := s.GetSockOptUInt64(TYPE)
20	return SocketType(value), err
21}
26//
27func (s *Socket) RcvMore() (bool, error) {
28	value, err := s.GetSockOptInt(RCVMORE)
lib.rs git://github.com/erickt/rust-zmq.git | Rust | 1,317 lines
435    /// from being dropped while being live.
436    pub fn socket(&self, socket_type: SocketType) -> Result<Socket> {
437        let sock = unsafe { zmq_sys::zmq_socket(self.raw.ctx, socket_type.to_raw()) };
765    /// Return the type of this socket.
766    pub fn get_socket_type(&self) -> Result<SocketType> {
767        sockopt::get(self.sock, zmq_sys::ZMQ_TYPE as c_int).map(SocketType::from_raw)
1065    /// Returns true if the polled socket is the given 0MQ socket.
1066    pub fn has_socket(&self, socket: &Socket) -> bool {
1067        self.socket == socket.sock
1099///
1100/// A proxy connects a frontend socket with a backend socket, where the exact
1101/// behavior depends on the type of both sockets.
1104/// has been closed.
1105pub fn proxy(frontend: &Socket, backend: &Socket) -> Result<()> {
1106    zmq_try!(unsafe { zmq_sys::zmq_proxy(frontend.sock, backend.sock, ptr::null_mut()) });
SocketExtension.cs https://awkdotnet.svn.codeplex.com/svn | C# | 1,673 lines
142	/// <li>Any mix of
143	/// serversocket, cserversocket, socket, or csocket
144	/// handles and/or associative
152	/// <li>A string of the form: <code><font size=+1>SocketClose<em>OFS</em>handle</font></code>
153	/// where handle is a serversocket, cserversocket, socket,
154	/// or csocket handle.
224	/// <ul>
225	/// <li>socket/csocket/serversocket/cserversocket handle - required
226	/// </ul>
263			return new string[] { "ServerSocket", "CServerSocket", "Socket", "CSocket", "SocketAcceptBlock"
264				, "SocketInputBlock", "SocketCloseBlock", "SocketAccept", "SocketRead", "SocketWrite"
265				, "SocketFlush", "SocketClose" };
572		/// An array of
573		/// serversocket, cserversocket, socket, or csocket
574		/// handles and/or associative
test_socket.py https://bitbucket.org/amauryfa/pypy-sepcomp | Python | 996 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)
923        s1.listen(1)
924        s2 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
925        s2.connect(s1.getsockname())
test_socket.py https://bitbucket.org/probreasoning/pypy | Python | 1,013 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)
464        # Testing getsockname()
465        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
466        sock.bind(("0.0.0.0", PORT+1))
477        # We know a socket should start without reuse==0
478        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
479        reuse = sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR)
497        # testing .family, .type and .protocol
498        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
499        self.assertEqual(sock.family, socket.AF_INET)
940        s1.listen(1)
941        s2 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
942        s2.connect(s1.getsockname())
uipc_socket.c https://bitbucket.org/brucec/sctpdrv | C | 3,491 lines
37 *
38 * soalloc() sets of socket layer state for a socket, called only by
39 * socreate() and sonewconn().  Socket layer private.
40 *
41 * sodealloc() tears down socket layer state for a socket, called only by
42 * sofree() and sonewconn().  Socket layer private.
84 * the socket have been released, and is the public interface to attempt to
85 * free a socket when a reference is removed.  This is a socket layer private
86 * interface.
3324void
3325sotoxsocket(struct socket *so, struct xsocket *xso)
3326{
3360void
3361so_listeners_apply_all(struct socket *so, void (*func)(struct socket *, void *), void *arg)
3362{
winnet.c https://bitbucket.org/daybreaker/iputty | C | 1,827 lines
31 * abstract, Socket no longer means a tcp socket (it could mean
32 * an ssl socket).  So now we must use Actual_Socket when we know
33 * we are talking about a tcp socket.
34 */
35typedef struct Socket_tag *Actual_Socket;
36
123{
124    Actual_Socket a = (Actual_Socket) av, b = (Actual_Socket) bv;
125    unsigned long as = (unsigned long) a->s, bs = (unsigned long) b->s;
417      case WSAENOTSOCK:
418	return "Network error: Socket operation on non-socket";
419      case WSAEOPNOTSUPP:
1781
1782extern int socket_writable(SOCKET skt)
1783{
socket.rst https://bitbucket.org/G_will/python3-docs-zh_cn | Unknown | 1,077 lines
766
767   Send data to the socket.  The socket must be connected to a remote socket.  The
768   optional *flags* argument has the same meaning as for :meth:`recv` above.
775
776   Send data to the socket.  The socket must be connected to a remote socket.  The
777   optional *flags* argument has the same meaning as for :meth:`recv` above.
936   PORT = 50007              # Arbitrary non-privileged port
937   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
938   s.bind((HOST, PORT))
954   PORT = 50007              # The same port as used by the server
955   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
956   s.connect((HOST, PORT))
1044   # create a raw socket and bind it to the public interface
1045   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
1046   s.bind((HOST, 0))
basic_socket.hpp https://bitbucket.org/Leijing/lip-measurement | C++ Header | 1,465 lines
153   */
154  basic_socket(basic_socket&& other)
155    : basic_io_object<SocketService>(
1411   * @code
1412   * boost::asio::ip::tcp::socket socket(io_service);
1413   * ...
1413   * ...
1414   * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send);
1415   * @endcode
1435   * @code
1436   * boost::asio::ip::tcp::socket socket(io_service);
1437   * ...
1438   * boost::system::error_code ec;
1439   * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec);
1440   * if (ec)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21