PageRenderTime 55ms queryFilters 9ms Sphinxql 426ms GetByIds 132ms meta 0ms repositoryFilters 15ms languageFilters 11ms sourceFilters 3ms

1,422,939 results for 'socket repo:jurajseffer/react' (55 ms)

Source

Language

Repository

socket.h https://github.com/danielchow/libnode.git | C++ Header | 393 lines
2
3#ifndef LIBNODE_DETAIL_DGRAM_SOCKET_H_
4#define LIBNODE_DETAIL_DGRAM_SOCKET_H_
8#include <libnode/process.h>
9#include <libnode/dgram/socket.h>
10#include <libnode/detail/uv/udp.h>
17
18class Socket : public events::EventEmitter<node::dgram::Socket> {
19 public:
19 public:
20    LIBJ_MUTABLE_DEFS(Socket, LIBNODE_DGRAM_SOCKET);
21
22    static Ptr create(Type type, JsFunction::Ptr callback) {
23        Socket* sock = new Socket(type);
24        sock->on(EVENT_MESSAGE, callback);
socket.h https://github.com/jay/wxWidgets.git | C++ Header | 436 lines
58    wxSOCKET_CONNECTION_FLAG = 1 << wxSOCKET_CONNECTION,
59    wxSOCKET_LOST_FLAG = 1 << wxSOCKET_LOST
60};
85    wxSOCKET_NOWAIT_WRITE   = 0x0002,
86    wxSOCKET_NOWAIT         = wxSOCKET_NOWAIT_READ | wxSOCKET_NOWAIT_WRITE,
87    wxSOCKET_WAITALL_READ   = 0x0004,
88    wxSOCKET_WAITALL_WRITE  = 0x0008,
89    wxSOCKET_WAITALL        = wxSOCKET_WAITALL_READ | wxSOCKET_WAITALL_WRITE,
90    wxSOCKET_BLOCK          = 0x0010,
124    wxSocketBase();
125    wxSocketBase(wxSocketFlags flags, wxSocketType type);
126    virtual ~wxSocketBase();
334public:
335    wxSocketClient(wxSocketFlags flags = wxSOCKET_NONE);
336
socket.c https://github.com/jonathanleang/Open-Source-FPGA-Bitcoin-Miner.git | C | 191 lines
3
4#include "socket.h"
5#include "w5100.h"
16
17uint8_t read_sock_reg(SOCKET s, uint8_t reg)
18{
26// Initialize a TCP socket
27uint8_t socket(SOCKET s, uint16_t port)
28{
43
44void close(SOCKET s)
45{
49
50uint8_t socket_status(SOCKET s)
51{
netlink-socket.h https://github.com/noironetworks/ovs.git | C++ Header | 280 lines
16
17#ifndef NETLINK_SOCKET_H
18#define NETLINK_SOCKET_H 1
22 * This header file defines functions for working with Netlink sockets.  Only
23 * Linux natively supports Netlink sockets, but Netlink is well suited as a
24 * basis for extensible low-level protocols, so it can make sense to implement
82 *       nl_transact() is the primary interface for transactions over Netlink.
83 *       This function doesn't take a socket as a parameter because sockets do
84 *       not have any state related to transactions.
155 *       queue for packets, and it does so only when userspace "subscribe"'s to
156 *       packets on that netlink socket.  Before closing the netlink socket,
157 *       userspace needs to "unsubscribe" packets on that netlink socket.
203#ifndef _WIN32
204#error "netlink-socket.h is only for hosts that support Netlink sockets"
205#endif
csma-packet-socket.cc https://github.com/scarletttu/ns-3-codel-dev.git | C++ | 135 lines
23//
24// - Two packet socket flows:  from n0 to n1 and from n3 to n0
25// - Default 512 byte packets generated by traffic generator
55#if 0 
56  LogComponentEnable ("CsmaPacketSocketExample", LOG_LEVEL_INFO);
57#endif
68
69  PacketSocketHelper packetSocket;
70  packetSocket.Install (nodes);
85  // Create the OnOff application to send raw datagrams
86  PacketSocketAddress socket;
87  socket.SetSingleDevice (devs.Get (0)->GetIfIndex ());
89  socket.SetProtocol (2);
90  OnOffHelper onoff ("ns3::PacketSocketFactory", Address (socket));
91  onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1.0)));
udp-socket-impl.cc https://github.com/scarletttu/ns-3-codel-dev.git | C++ | 1,052 lines
143
144enum Socket::SocketErrno
145UdpSocketImpl::GetErrno (void) const
567      header.SetProtocol (UdpL4Protocol::PROT_NUMBER);
568      Socket::SocketErrno errno_;
569      Ptr<Ipv4Route> route;
689      header.SetNextHeader (UdpL4Protocol::PROT_NUMBER);
690      Socket::SocketErrno errno_;
691      Ptr<Ipv6Route> route;
738    {
739      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
740      Ipv4Address ipv4 = transport.GetIpv4 ();
745    {
746      Inet6SocketAddress transport = Inet6SocketAddress::ConvertFrom (address);
747      Ipv6Address ipv6 = transport.GetIpv6 ();
socket.h https://bitbucket.org/iffatahmed/lena | C++ Header | 694 lines
41 * \ingroup node
42 * \defgroup socket Socket
43 */
45/**
46 * \brief A low-level Socket API based loosely on the BSD Socket API.
47 * \ingroup socket
103   */
104  static Ptr<Socket> CreateSocket (Ptr<Node> node, TypeId tid);
105  /**
113    */
114  virtual enum Socket::SocketType GetSocketType (void) const = 0;
115  /**
588   * For IP_PKTINFO/IP6_PKTINFO. This method is only usable for 
589   * Raw socket and Datagram Socket. Not supported for Stream socket.
590   *
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))
socket.rst https://bitbucket.org/matthewlmcclure/cpython | Unknown | 1,436 lines
1227   PORT = 50007              # Arbitrary non-privileged port
1228   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1229   s.bind((HOST, PORT))
1245   PORT = 50007              # The same port as used by the server
1246   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1247   s.connect((HOST, PORT))
1335   # create a raw socket and bind it to the public interface
1336   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
1337   s.bind((HOST, 0))
1354
1355    socket.socket(socket.AF_CAN, socket.SOCK_DGRAM, socket.CAN_BCM)
1356
1382   # create a raw socket and bind it to the 'vcan0' interface
1383   s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
1384   s.bind(('vcan0',))
socket.py https://bitbucket.org/matthewlmcclure/cpython | Python | 457 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
88
89    """A subclass of _socket.socket adding the makefile() method."""
90
252    def socketpair(family=None, type=SOCK_STREAM, proto=0):
253        """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
254
socket.rst https://bitbucket.org/python_mirrors/features-pep-433 | Unknown | 1,425 lines
1225   PORT = 50007              # Arbitrary non-privileged port
1226   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1227   s.bind((HOST, PORT))
1243   PORT = 50007              # The same port as used by the server
1244   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1245   s.connect((HOST, PORT))
1333   # create a raw socket and bind it to the public interface
1334   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
1335   s.bind((HOST, 0))
1371   # create a raw socket and bind it to the 'vcan0' interface
1372   s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
1373   s.bind(('vcan0',))
1400
1401   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1402   s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
socket.py https://bitbucket.org/python_mirrors/features-pep-433 | 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, cloexec=True):
234        """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
235
socket.rst https://bitbucket.org/atsuoishimoto/cpython | Unknown | 1,516 lines
1307   PORT = 50007              # Arbitrary non-privileged port
1308   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1309   s.bind((HOST, PORT))
1325   PORT = 50007              # The same port as used by the server
1326   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1327   s.connect((HOST, PORT))
1415   # create a raw socket and bind it to the public interface
1416   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
1417   s.bind((HOST, 0))
1434
1435    socket.socket(socket.AF_CAN, socket.SOCK_DGRAM, socket.CAN_BCM)
1436
1462   # create a raw socket and bind it to the 'vcan0' interface
1463   s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
1464   s.bind(('vcan0',))
socket.py https://bitbucket.org/atsuoishimoto/cpython | Python | 536 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 [*]
39
40AF_INET, AF_UNIX -- socket domains (first argument to socket() call)
41SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument)
111
112class socket(_socket.socket):
113
307    def socketpair(family=None, type=SOCK_STREAM, proto=0):
308        """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
309
socket.py https://bitbucket.org/nicfit/concurrence | Python | 351 lines
75    def new(cls):
76        return cls(_socket.socket(_socket.AF_INET, _socket.SOCK_STREAM))
77
94    @classmethod
95    def from_file_descriptor(cls, fd, socket_family = _socket.AF_UNIX, socket_type = _socket.SOCK_STREAM, socket_state = STATE_INIT):
96        return cls(_socket.fromfd(fd, socket_family, socket_type), socket_state)
121    def set_reuse_address(self, reuse_address):
122        self.socket.setsockopt(_socket.SOL_SOCKET, _socket.SO_REUSEADDR, int(reuse_address))
123
127    def set_recv_buffer_size(self, n):
128        self.socket.setsockopt(_socket.SOL_SOCKET, _socket.SO_RCVBUF, n)
129
255
256    def read_socket(self, socket_class = None, socket_family =  _socket.AF_INET, socket_type = _socket.SOCK_STREAM, socket_state = STATE_INIT, timeout = TIMEOUT_CURRENT):
257        """reads a socket from this socket"""
socket.h https://bitbucket.org/klenkovic/ns-3-dev-logging-fixes | C++ Header | 976 lines
43 * \ingroup network
44 * \defgroup socket Socket
45 */
113   */
114  virtual enum Socket::SocketErrno GetErrno (void) const = 0;
115  /**
117    */
118  virtual enum Socket::SocketType GetSocketType (void) const = 0;
119  /**
598   * For IP_PKTINFO/IP6_PKTINFO. This method is only usable for 
599   * Raw socket and Datagram Socket. Not supported for Stream socket.
600   *
773   * This method corresponds to using setsockopt () IPV6_RECVHOPLIMIT of real
774   * network or BSD sockets. In our implementation, the socket simply 
775   * adds a SocketIpv6HopLimitTag tag to the packet before passing the
Socket.h https://github.com/Canno/mangos.git | C Header | 739 lines
75		Socket *GetSocket() const { return m_socket; }
76		SocketThread(const SocketThread& s) : m_socket(s.GetSocket()) {}
77		SocketThread& operator=(const SocketThread& ) { return *this; }
138	/** "Default" constructor */
139	Socket(ISocketHandler&);
140
679private:
680	ISocketHandler& m_handler; ///< Reference of ISocketHandler in control of this socket
681	SOCKET m_socket; ///< File descriptor
684	time_t m_tCreate; ///< Time in seconds when this socket was created
685	Socket *m_parent; ///< Pointer to ListenSocket class, valid for incoming sockets
686	bool m_b_disable_read; ///< Disable checking for read events
711#ifdef ENABLE_POOL
712	int m_socket_type; ///< Type of socket, from socket() call
713	std::string m_socket_protocol; ///< Protocol, from socket() call
postgresql-socket-api.lisp https://github.com/UnwashedMeme/clsql.git | Lisp | 973 lines
415                                 :defaults host))))
416       (socket:make-socket :type :stream :address-family :file
417                           :connect :active
608  (let ((socket (postgresql-connection-socket connection)))
609    (and socket (streamp socket) (open-stream-p socket))))
610
940            (#.+completed-response-message+
941             (return (values nil (read-socket-value-string socket))))
942            (#.+error-response-message+
942            (#.+error-response-message+
943             (let ((message (read-socket-value-string socket)))
944               (error 'postgresql-error
946            (#.+notice-response-message+
947             (let ((message (read-socket-value-string socket)))
948               (warn 'postgresql-warning
socket.rb https://github.com/thewoolleyman/ruby.git | Ruby | 730 lines
334  #   # tcp_server_sockets returns two sockets.
335  #   sockets = Socket.tcp_server_sockets(1296)
336  #   p sockets #=> [#<Socket:fd 3>, #<Socket:fd 4>]
343  #   # IPv6 and IPv4 socket has same port number, 53114, even if it is choosen dynamically.
344  #   sockets = Socket.tcp_server_sockets(0)
345  #   sockets.each {|s| p s.local_address }
349  #   # The block is called with the sockets.
350  #   Socket.tcp_server_sockets(0) {|sockets|
351  #     p sockets #=> [#<Socket:fd 3>, #<Socket:fd 4>]
476  #   # UDP/IP echo server
477  #   Socket.udp_server_sockets(0) {|sockets|
478  #     p sockets.first.local_address.ip_port     #=> 32963
667  #
668  #   socket = Socket.unix_server_socket("/tmp/s")
669  #   p socket                  #=> #<Socket:fd 3>
Socket.java https://github.com/tisoft/xmlvm.git | Java | 1,147 lines
302     */
303    protected Socket(SocketImpl anImpl) throws SocketException {
304        impl = anImpl;
796     */
797    public SocketAddress getLocalSocketAddress() {
798        if (!isBound()) {
1040    /**
1041     * Gets the setting of the socket option {@code SocketOptions.SO_OOBINLINE}.
1042     * 
1055    /**
1056     * Sets the value of the {@code SocketOptions.IP_TOS} for this socket. See
1057     * the specification RFC 1349 for more information about the type of service
1075    /**
1076     * Gets the value of the socket option {@code SocketOptions.IP_TOS}.
1077     * 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21