On Wednesday, 16 March 2016 at 20:44:12 UTC, Lucien wrote:
Hello,
I want to know if a port of an ip address is listening,
actually, I've this :
http://pastebin.com/pZhm0ujy
(checking port 22/ssh)
It works, but it took me ~10min to scan 30 addresses.
How can reduce the expiration delay ?
On Thursday, 24 March 2016 at 12:17:35 UTC, Marc Schütz wrote:
On Wednesday, 23 March 2016 at 21:37:09 UTC, Lucien wrote:
When I remove the Thread.sleep, it doesn't find all adresses.
Why ?
Socket.select() will wait _at most_ 100 msecs. If a socket gets
ready before that timeout, it will
On Wednesday, 23 March 2016 at 21:37:09 UTC, Lucien wrote:
When I remove the Thread.sleep, it doesn't find all adresses.
Why ?
Socket.select() will wait _at most_ 100 msecs. If a socket gets
ready before that timeout, it will return immediately. Therefore,
you might not get the full
On Saturday, 19 March 2016 at 18:24:38 UTC, Marc Schütz wrote:
On Saturday, 19 March 2016 at 09:55:13 UTC, Lucien wrote:
const int MAX = 64;
Socket[] sockets = new Socket[MAX];
string ipb = "192.168.0.";
for (int i = 1; i < MAX; i++) {
Here's the reason for your SEGV: You
On Thursday, 17 March 2016 at 10:41:55 UTC, Marc Schütz wrote:
On Wednesday, 16 March 2016 at 22:22:15 UTC, Anonymouse wrote:
import core.thread; // for .seconds
Nitpick: `seconds` is defined in `core.time`; `core.thread`
just reexports it.
s.setOption(SocketOptionLevel.SOCKET, SNDTIMEO,
On Saturday, 19 March 2016 at 18:24:38 UTC, Marc Schütz wrote:
On Saturday, 19 March 2016 at 09:55:13 UTC, Lucien wrote:
const int MAX = 64;
Socket[] sockets = new Socket[MAX];
string ipb = "192.168.0.";
for (int i = 1; i < MAX; i++) {
Here's the reason for your SEGV: You
On Saturday, 19 March 2016 at 09:55:13 UTC, Lucien wrote:
const int MAX = 64;
Socket[] sockets = new Socket[MAX];
string ipb = "192.168.0.";
for (int i = 1; i < MAX; i++) {
Here's the reason for your SEGV: You need to start at 0, because
otherwise `sockets[0]` is `null`. When
Hello,
I want to know if a port of an ip address is listening, actually,
I've this :
http://pastebin.com/pZhm0ujy
(checking port 22/ssh)
It works, but it took me ~10min to scan 30 addresses.
How can reduce the expiration delay ?
On Friday, 18 March 2016 at 09:50:12 UTC, Marc Schütz wrote:
Looking at an strace of nmap, it seems it opens a bunch of
sockets, puts them into non-blocking mode, calls connect on
them (which will return EINPROGRESS), and then uses select(2)
to wait for them (in a loop, until all have either
Looking at an strace of nmap, it seems it opens a bunch of
sockets, puts them into non-blocking mode, calls connect on them
(which will return EINPROGRESS), and then uses select(2) to wait
for them (in a loop, until all have either been accepted or
rejected). select(2) accepts a timeout value,
On Wednesday, 16 March 2016 at 22:22:15 UTC, Anonymouse wrote:
import core.thread; // for .seconds
Nitpick: `seconds` is defined in `core.time`; `core.thread` just
reexports it.
s.setOption(SocketOptionLevel.SOCKET, SNDTIMEO, 10.seconds);
s.setOption(SocketOptionLevel.SOCKET, RCVTIMEO,
On Wednesday, 16 March 2016 at 20:44:12 UTC, Lucien wrote:
Hello,
I want to know if a port of an ip address is listening,
actually, I've this :
http://pastebin.com/pZhm0ujy
(checking port 22/ssh)
It works, but it took me ~10min to scan 30 addresses.
How can reduce the expiration delay ?
I
On Wednesday, 16 March 2016 at 22:22:15 UTC, Anonymouse wrote:
On Wednesday, 16 March 2016 at 20:44:12 UTC, Lucien wrote:
Hello,
I want to know if a port of an ip address is listening,
actually, I've this :
http://pastebin.com/pZhm0ujy
(checking port 22/ssh)
It works, but it took me ~10min
see also:
https://github.com/rejectedsoftware/vibe.d/issues/1431 api to find an
available port
On Fri, Mar 18, 2016 at 2:50 AM, Marc Schütz via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> Looking at an strace of nmap, it seems it opens a bunch of sockets, puts
> them
14 matches
Mail list logo