626,242 results for 'socket repo:wapiflapi/callback' (31 ms)
zmq_setsockopt.txt https://github.com/unixcrh/libzmq.git | Unknown | 560 lines
22'option_name' argument to the value pointed to by the 'option_value' argument 23for the 0MQ socket pointed to by the 'socket' argument. The 'option_len' 24argument is the size of the option value in bytes. 39blocking or dropping sent messages. Refer to the individual socket descriptions 40in linkzmq:zmq_socket[3] for details on the exact action taken for each socket 41type. 100The 'ZMQ_SUBSCRIBE' option shall establish a new message filter on a 'ZMQ_SUB' 101socket. Newly created 'ZMQ_SUB' sockets shall filter out all incoming messages, 102therefore you should call this option to establish an initial message filter. 350Set the IPv6 option for the socket. A value of `1` means IPv6 is 351enabled on the socket, while `0` means the socket will use only IPv4. 352When IPv6 is enabled the socket will connect to, or accept connections 498Default value:: no filters (allow from all) 499Applicable socket types:: all listening sockets, when using TCP transports. 500chat-commands.js https://github.com/CanBoy67/Pokemon-Showdown.git | JavaScript | 2,135 lines
28 * 29 * `user` and `socket` are the user and socket that sent the message, 30 * and `room` is the room that sent the message. 2044 if (user.blockLobbyChat) { 2045 if (socket) emit(socket, 'console', "You can't send messages while blocking lobby chat."); 2046 return false; 2050 if (!user.can('ignorelimits')) { 2051 if (socket) emit(socket, 'console', 'Because the server has crashed, you cannot speak in lobby chat.'); 2052 return false; 2055 if (!user.authenticated && config.modchat === true) { 2056 if (socket) emit(socket, 'console', 'Because moderated chat is set, you must be registered to speak in lobby chat. To register, simply win a rated battle by clicking the look for battle button'); 2057 return false; 2060 if (!groupName) groupName = config.modchat; 2061 if (socket) emit(socket, 'console', 'Because moderated chat is set, you must be of rank ' + groupName +' or higher to speak in lobby chat.'); 2062 return false;Socket.hsc https://github.com/hf6440/network.git | Unknown | 1,674 lines
351 allocaBytes (2 * sizeOf (1 :: CInt)) $ \ fdArr -> do 352 c_stype <- packSocketTypeOrThrow "socketPair" stype 353 _rc <- throwSocketErrorIfMinus1Retry "socketpair" $ 781 782socketPort :: Socket -- Connected & Bound Socket 783 -> IO PortNumber -- Port Number of Socket 822 823-- | Socket options for use with 'setSocketOption' and 'getSocketOption'. 824-- 1172socketToHandle :: Socket -> IOMode -> IO Handle 1173socketToHandle s@(MkSocket fd _ _ _ socketStatus) mode = do 1174 modifyMVar socketStatus $ \ status -> 1645-- | Deprecated alias for 'bind'. 1646bindSocket :: Socket -- Unconnected Socket 1647 -> SockAddr -- Address to Bind toNetUtils.java https://github.com/YaoLin1/hadoop.git | Java | 444 lines
105 */ 106 public static SocketFactory getSocketFactoryFromProperty( 107 Configuration conf, String propValue) { 283 return (socket.getChannel() == null) ? 284 socket.getInputStream() : new SocketInputStream(socket, timeout); 285 } 334 return (socket.getChannel() == null) ? 335 socket.getOutputStream() : new SocketOutputStream(socket, timeout); 336 } 339 * This is a drop-in replacement for 340 * {@link Socket#connect(SocketAddress, int)}. 341 * In the case of normal sockets that don't have associated channels, this 348 * 349 * @see java.net.Socket#connect(java.net.SocketAddress, int) 350 *OldSocketTest.java https://github.com/PAmoto/android_libcore.git | Java | 2,624 lines
931 // right answer 932 Socket theSocket = new Socket(); 933 portNumber = Support_PortManager.getNextPort(); 955 int port = Support_PortManager.getNextPort(); 956 ServerSocket serverSocket = new ServerSocket(port, 5, addr); 957 Socket theSocket = new Socket(addr, port); 996 int port = Support_PortManager.getNextPort(); 997 ServerSocket serverSocket = new ServerSocket(port, 5, addr); 998 Socket theSocket = new Socket(addr, port); 1736 .getLocalHost(), Support_PortManager.getNextPort()); 1737 Socket theSocket = new Socket(); 1738 ServerSocket serverSocket = new ServerSocket(); 2461 ss.accept(); 2462 Socket socket = channel.socket(); 2463Socket.java https://github.com/PAmoto/android_libcore.git | Java | 1,154 lines
328 */ 329 protected Socket(SocketImpl impl) throws SocketException { 330 this.impl = impl; 783 if (!isConnected()) { 784 throw new SocketException("Socket is not connected"); 785 // a connected socket must be created 1059 /** 1060 * Gets the setting of the socket option {@code SocketOptions.SO_OOBINLINE}. 1061 * 1073 /** 1074 * Sets the {@see SocketOptions#IP_TOS} value for every packet sent by this socket. 1075 * 1087 /** 1088 * Returns this socket's {@see SocketOptions#IP_TOS} setting. 1089 *sockets.py https://github.com/Dischi/kaa-base.git | Python | 758 lines
226 try: 227 dummy = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 228 dummy.connect(sockaddr) 241 242 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 243 if addr: 283 sock = socket.socket(b_af, b_socktype, b_proto) 284 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 285 b_sa = b_sa[:2] + source_address[2:] 303 sock = socket.socket(af, socktype, proto) 304 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 305 if timeout is not TIMEOUT_SENTINEL: 513 s.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, size) 514 s.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, size) 515TcpSendingMessageHandlerTests.java https://github.com/nickspacek/spring-integration.git | Java | 1,129 lines
266 try { 267 ServerSocket server = ServerSocketFactory.getDefault().createServerSocket(port); 268 latch.countDown(); 527 try { 528 ServerSocket server = ServerSocketFactory.getDefault().createServerSocket(port); 529 latch.countDown(); 580 try { 581 ServerSocket server = ServerSocketFactory.getDefault().createServerSocket(port); 582 latch.countDown(); 668 try { 669 ServerSocket server = ServerSocketFactory.getDefault().createServerSocket(port); 670 latch.countDown(); 1042 try { 1043 ServerSocket server = ServerSocketFactory.getDefault().createServerSocket(port); 1044 latch.countDown();rtmp_socket.erl https://github.com/brahimalaya/publisher.git | Erlang | 783 lines
298 299wait_for_socket_on_server({socket, Socket}, #rtmp_socket{} = State) when is_port(Socket) -> 300 case inet:peername(Socket) of 307 308wait_for_socket_on_server({socket, Socket}, #rtmp_socket{} = State) when is_pid(Socket) -> 309 erlang:monitor(process, Socket), 480 481handle_sync_event(get_socket, _From, StateName, #rtmp_socket{socket = Socket} = State) when is_pid(Socket)-> 482 {reply, {rtmpt,undefined}, StateName, State, ?RTMP_TIMEOUT}; 624 625activate_socket(#rtmp_socket{socket = Socket}) when is_port(Socket) -> 626 inet:setopts(Socket, [{active, once}]); 626 inet:setopts(Socket, [{active, once}]); 627activate_socket(#rtmp_socket{socket = Socket}) when is_pid(Socket) -> 628 ok.rtsp_socket.erl https://github.com/brahimalaya/publisher.git | Erlang | 591 lines
166%%------------------------------------------------------------------------- 167handle_cast({socket_ready, Socket}, #rtsp_socket{timeout = Timeout} = State) -> 168 {ok, {IP, Port}} = inet:peername(Socket), 272 ?DUMP_RESPONSE(Dump, Response), 273 Socket1 = handle_response(extract_session(Socket#rtsp_socket{buffer = Rest}, Headers), Response), 274 handle_packet(Socket1); 276 ?DUMP_REQUEST(Dump, Request), 277 Socket1 = handle_request(Request, Socket#rtsp_socket{buffer = Rest}), 278 handle_packet(Socket1) 289 end, 290 {noreply, Socket1, _T} = rtsp_inbound:handle_call({request,Request}, From, Socket#rtsp_socket{auth_type = digest, auth = DigestAuth}), 291 Socket1; 516 517send_teardown(#rtsp_socket{socket = Socket, url = URL, auth = Auth, seq = Seq} = RTSP) -> 518 Call = io_lib:format("TEARDOWN ~s RTSP/1.0\r\nCSeq: ~p\r\nAccept: application/sdp\r\n"++Auth("TEARDOWN", URL)++"\r\n", [URL, Seq+1]),sflsock.c https://github.com/gbluma/gsl.git | C | 2,127 lines
169 Synopsis: Creates a passive bound TCP socket for the specified service. 170 Returns socket number or INVALID_SOCKET. If it returns INVALID_SOCKET, 171 you can get the reason for the error by calling connect_error (). This 198 Synopsis: Creates a passive UDP socket for the specified service. 199 Returns socket number or INVALID_SOCKET. If it returns INVALID_SOCKET, 200 you can get the reason for the error by calling connect_error (). This 385 */ 386 setsockopt ((SOCKET) handle, SOL_SOCKET, SO_REUSEADDR, 387 (char *) &true_value, sizeof (true_value)); 1096 sin_length = (int) sizeof (sin); 1097 slave_socket = accept ((SOCKET) master_socket, 1098 (struct sockaddr *) &sin, &sin_length); 1524#else 1525 return ((int) SOCKET_ERROR); /* Sockets not supported */ 1526#endiflhttpc_client.erl https://github.com/abeniaminov/lhttpc.git | Erlang | 667 lines
105 SocketRequest = {socket, self(), Host, Port, Ssl}, 106 Socket = case gen_server:call(lhttpc_manager, SocketRequest, infinity) of 107 {ok, S} -> S; % Re-using HTTP/1.1 connections 117 request_headers = Hdrs, 118 socket = Socket, 119 connect_timeout = proplists:get_value(connect_timeout, Options, 177send_request(State) -> 178 Socket = State#client_state.socket, 179 Ssl = State#client_state.ssl, 272 ReqHdrs = State#client_state.request_headers, 273 NewSocket = maybe_close_socket(Socket, Ssl, Vsn, ReqHdrs, NewHdrs), 274 {Response, NewSocket}; 656 end; 657maybe_close_socket(Socket, Ssl, _, ReqHdrs, RespHdrs) -> 658 ClientConnection = ?CONNECTION_HDR(ReqHdrs, "keep-alive"),zmq.lisp https://github.com/nubgames/lisp-zmq.git | Lisp | 482 lines
160 (with-socket-locked (socket) 161 (call-ffi -1 '%connect (socket-%socket socket) %endpoint)))) 162 201 (setf (mem-ref %size 'size-t) length) 202 (call-ffi -1 '%getsockopt (socket-%socket socket) option %value %size)) 203 (case option 254 (call-ffi 0 '%device (foreign-enum-value 'device-type type) 255 (socket-%socket frontend) (socket-%socket backend))))) 256 391 (with-socket-locked (socket) 392 (call-ffi -1 '%recv (socket-%socket socket) message 393 (foreign-bitfield-value 'recv-options flags)))) 415 ((typep handle 'socket) 416 (setf socket (socket-%socket handle))) 417 ((pointerp handle)socket_spec.rb https://github.com/paav-o/ffi-rzmq.git | Ruby | 633 lines
41 42 it "should not raise an error for a [#{ZMQ::SocketTypeNameMap[socket_type]}] socket type" do 43 sock = nil 54 sock = Socket.new(@ctx.pointer, ZMQ::REQ) 55 sock.socket.should == socket 56 end 131 132 context "#setsockopt for a #{ZMQ::SocketTypeNameMap[socket_type]} socket" do 133 before(:all) { @ctx = Context.new } 136 let(:socket) do 137 Socket.new @ctx.pointer, socket_type 138 end 459 460 context "#getsockopt for a #{ZMQ::SocketTypeNameMap[socket_type]} socket" do 461 before(:all) { @ctx = Context.new }NetUtils.java https://github.com/dynamicguy/hadoop-20.git | Java | 551 lines
153 */ 154 public static InetSocketAddress createSocketAddr(String target, 155 int defaultPort) { 342 return (socket.getChannel() == null) ? 343 socket.getInputStream() : new SocketInputStream(socket, timeout); 344 } 393 return (socket.getChannel() == null) ? 394 socket.getOutputStream() : new SocketOutputStream(socket, timeout); 395 } 449 if (socket.getLocalPort() == socket.getPort() && 450 socket.getLocalAddress().equals(socket.getInetAddress())) { 451 LOG.info("Detected a loopback TCP socket, disconnecting it"); 524 525 public static int getIPTOS(Socket socket) throws IOException { 526 return LinuxSystemCall.getIPTOSVal(socket);net.js https://github.com/kevinxx/node_doc_zh_CN.git | JavaScript | 1,220 lines
170 if (socket._idleNext) { 171 socket._idleNext._idlePrev = socket._idlePrev; 172 socket._idlePrev._idleNext = socket._idleNext; 269 if (socket.flush()) { 270 if (socket._events && socket._events['drain']) socket.emit("drain"); 271 if (socket.ondrain) socket.ondrain(); // Optimization 856 socket._writeWatcher.callback = function () { 857 var errno = socketError(socket.fd); 858 if (errno == 0) { 861 socket.resume(); 862 socket.readable = socket.writable = true; 863 socket._writeWatcher.callback = _doFlush; 881// stream.connect(80, 'nodejs.org') - TCP connect to port 80 on nodejs.org 882// stream.connect('/tmp/socket') - UNIX connect to socket specified by path 883Stream.prototype.connect = function () {dlhttpc_client.erl https://github.com/ferd/dlhttpc.git | Erlang | 656 lines
113 SockOpts = [binary, {packet, http}, {active, false} | ConnectOptions], 114 {SocketRef, Socket} = 115 case MaxConnections of 132 request_headers = Hdrs, 133 socket_ref = SocketRef, 134 socket = Socket, 223 224send_body_part(State = #client_state{socket = Socket, ssl = Ssl}, BodyPart) -> 225 Data = encode_body_part(State, BodyPart), 278 ReqHdrs = State#client_state.request_headers, 279 NewSocket = maybe_close_socket(Socket, Ssl, Vsn, ReqHdrs, NewHdrs), 280 {Response, NewSocket}; 635 636maybe_close_socket(Socket, Ssl, {1, Minor}, ReqHdrs, RespHdrs) when Minor >= 1-> 637 ClientConnection = ?CONNECTION_HDR(ReqHdrs, "keep-alive"),erlzmq_nif.c https://github.com/betawaffle/erlzmq2.git | C | 1,284 lines
195 196 erlzmq_socket_t * socket = enif_alloc_resource(erlzmq_nif_resource_socket, 197 sizeof(erlzmq_socket_t)); 200 socket->socket_index = context->socket_index++; 201 socket->socket_zmq = zmq_socket(context->context_zmq, socket_type); 202 if (!socket->socket_zmq) { 357 enif_mutex_lock(socket->mutex); 358 if (zmq_setsockopt(socket->socket_zmq, option_name, 359 option_value, option_len)) { 917 zmq_pollitem_t * item = vector_get(zmq_pollitem_t, &items_zmq, i); 918 if (item->socket == r->data.close.socket->socket_zmq) { 919 erlzmq_thread_request_t * r_old = 975 enif_release_resource(r_old->data.send.socket); 976 zmq_close(r_old->data.send.socket->socket_zmq); 977 }LocalDescriptions.properties https://github.com/bcollett/jboss-as.git | Unknown | 393 lines
201socket-binding-group.default-interface=Name of an interface that should be used as the interface for any sockets that do not explicitly declare one. 202socket-binding-group.socket-binding=The individual socket configurations. 203socket-binding-group.port-offset=Increment to apply to the base port values defined in the socket bindings to derive the runtime values to use on this server. 221socket-binding.bound=Whether an actual socket using this socket binding configuration has been bound. 222socket-binding.bound-address=The address to which the actual socket using this socket binding configuration has been bound, or undefined if no socket has been bound. 223socket-binding.bound-port=The port to which the actual socket using this socket binding configuration has been bound, or undefined if no socket has been bound. 223socket-binding.bound-port=The port to which the actual socket using this socket binding configuration has been bound, or undefined if no socket has been bound. 224socket-binding.client-mappings=Specifies zero or more client mappings for this socket binding. A client connecting to this socket should use the destination address specified in the mapping that matches its desired outbound interface. This allows for advanced network topologies that use either network address translation, or have bindings on multiple network interfaces to function. Each mapping should be evaluated in declared order, with the first successful match used to determine the destination. 225socket-binding.client-mappings.source-network=Source network the client connection binds on. This value is in the form of ip/netmask. A client should match this value against the desired client host network interface, and if matched the client should connect to the corresponding destination values. If omitted this mapping should match any interface. 235remote-destination-outbound-socket-binding.remove=Removes a remote destination outbound socket binding, from a socket binding group 236remote-destination-outbound-socket-binding.fixed-source-port=Whether the port value should remain fixed even if numeric offsets are applied to the other outbound sockets in the socket group. 237 241local-destination-outbound-socket-binding.source-port=The port number which will be used as the source port of the outbound socket. 242local-destination-outbound-socket-binding.socket-binding-ref=The name of the local socket-binding which will be used to determine the port to which this outbound socket connects. 243local-destination-outbound-socket-binding.add=Adds a local destination outbound socket binding, to a socket binding groupSocket.hsc https://github.com/singpolyma/network.git | Unknown | 1,671 lines
355 allocaBytes (2 * sizeOf (1 :: CInt)) $ \ fdArr -> do 356 c_stype <- packSocketTypeOrThrow "socketPair" stype 357 _rc <- throwSocketErrorIfMinus1Retry "socketpair" $ 785 786socketPort :: Socket -- Connected & Bound Socket 787 -> IO PortNumber -- Port Number of Socket 826 827-- | Socket options for use with 'setSocketOption' and 'getSocketOption'. 828-- 1176socketToHandle :: Socket -> IOMode -> IO Handle 1177socketToHandle s@(MkSocket fd _ _ _ socketStatus) mode = do 1178 modifyMVar socketStatus $ \ status -> 1642-- | Deprecated alias for 'bind'. 1643bindSocket :: Socket -- Unconnected Socket 1644 -> SockAddr -- Address to Bind to