ports

How to “unbind” a socket programmatically?

牧云@^-^@ 提交于 2019-12-04 13:18:12
1) The socket doesn't seem to unbind from the LocalEndPoint until the process ends. 2) I have tried the solutions from the other question, and also tried waiting a minute - to no avail. 3) At the moment I have tried the below to get rid of the socket and its connections: public static void killUser(User victim) { LingerOption lo = new LingerOption(false, 0); victim.connectedSocket.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.Linger, lo); victim.connectedSocket.Shutdown(SocketShutdown.Both); victim.connectedSocket.Disconnect(true); victim.connectedSocket.Close(); clients.RemoveAt

Multiple websites on same IP with different ports withIIS [closed]

大兔子大兔子 提交于 2019-12-04 10:12:43
I had some test sites setup on a server that had one IP and utilized different ports for the site like this. www.acme.com:5000 www.acme.com:6000 This worked great until a SSL certificate was installed on the server. Now the sites above are not coming up. How do I configure them so that they come up again? SSL can only segmented by IP and Port. You can however can run SSL over a different port than 443 by simply adding a binding for https and a different port. In IIS 7.x, in the Bindings for the site, you would add one for SSL and change the port: What would also need to happen, which isn't

How to make socket.listen(1) work for some time and then continue rest of code?

自古美人都是妖i 提交于 2019-12-03 21:27:02
问题 I'm making server that make a tcp socket and work over port range, with each port it will listen on that port for some time, then continue the rest of the code. like this:: import socket sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) msg ='' ports = [x for x in xrange(4000)] while True: try: for i in ports: sck.bind(('',i)) ## sck.listen(1) ## make it just for some time and then continue this ## if there a connection do this

How can I check if ports 465 and 587 are open with PHP?

天涯浪子 提交于 2019-12-03 10:30:07
I'm trying to use PHPMailer to send e-mails with SMTP and gmail. The exact script am using works on other servers but it is not working on this particular hosting company's server. I have checked the phpinfo() and it tells me that allow_url_fopen is on and there are no disabled_functions like fopen listed. The script fails and it tells me either: SMTP -> ERROR: Failed to connect to server: Connection timed out (110) or else SMTP Error: Could not authenticate. I'm assuming this is because it can not connect, because again this work on other servers and the authentication credentials are correct

MSDTC - how many ports are needed

若如初见. 提交于 2019-12-03 05:41:06
I have a considerably large application that uses MSDTC. How many ports should I open? Is there any way to determine it? EDIT: I know what ports I need to open, I don't know how many I need. I think Migol wants to know how big the range of the RPC dynamic port allocation should be. In the KB they mention a minimum of 100 ports Furthermore, previous experience shows that a minimum of 100 ports should be opened, because several system services rely on these RPC ports to communicate with each other. So I would design a benchmark application to test different values of your dynamic range. When we

Programmatically stop and restart express servers (to change ports)

荒凉一梦 提交于 2019-12-03 04:30:47
I'm looking to be able to basically change ports that my express app is running on. I've tried: server.on('close', function() { server.listen(3000); }); server.listen(8080); server.close(); This returns a cryptic node.js error. I'm running node v0.4.11, I'm upgrading now to see if that fixes it. EDIT Here's the error: Assertion failed: (!io->watcher_.active), function Set, file ../src/node_io_watcher.cc, line 160. Thanks, Matt The issue is that .listen is asynchronous. By calling .close immediately after calling .listen , you are closing it before it has been opened. Try this instead. server

Which port(s) does XMPP use?

此生再无相见时 提交于 2019-12-03 03:18:02
问题 I´ve searched and didnt find which ports does XMPP uses. I need to implement XMPP server and client and use XML transfer, file transfer and streaming. Do they use different ports?? Is there a way I can make them use all the same, so I dont need to bother the network admin? Thanks 回答1: According to Wikipedia: 5222 TCP XMPP client connection (RFC 6120) Official 5223 TCP XMPP client connection over SSL Unofficial 5269 TCP XMPP server connection (RFC 6120) Official 5298 TCP UDP XMPP JEP-0174:

NodeJS Express - separate routes on two ports

我的梦境 提交于 2019-12-03 03:08:11
问题 I have an express server, and while building it created several "helper" functions on their own routes. I'd like those routes to be accessed on a different port. Is there anyway to do this in express? In the code below, the "/factory" route (and other functionality) would be on one port, and the helper routes of "/killallthings", "/listallthings", and "/killserver" would be on a separate port. Here is a simplified version of the code: var express = require('express'); var things = []; var app

Java: Common way to validate and convert “host:port” to InetSocketAddress?

99封情书 提交于 2019-12-02 23:36:24
What is the common way in Java to validate and convert a string of the form host:port into an instance of InetSocketAddress ? It would be nice if following criteria were met: No address lookups; Working for IPv4, IPv6, and "string" hostnames; (For IPv4 it's ip:port , for IPv6 it's [ip]:port , right? Is there some RFC which defines all these schemes?) Preferable without parsing the string by hand. (I'm thinking about all those special cases, when someone think he knows all valid forms of socket addresses, but forgets about "that special case" which leads to unexpected results.) java.is.for

What real platforms map hardware ports to memory addresses?

喜欢而已 提交于 2019-12-02 21:09:50
I sometimes see statements that on some platforms the following C or C++ code: int* ptr; *ptr = 0; can result in writing to a hardware input-output port if ptr happens to store the address to which that port is mapped. Usually they are called "embedded platforms". What are real examples of such platforms? Most systems in my experience use memory-mapped I/O. The x86 platform has a separate, non-memory-mapped I/O address space (that uses the in / out family of processor op-codes), but the PC architecture also extensively uses the standard memory address space for device I/O, which has a larger