- SECoP protocol for scriptcontext
This commit is contained in:
10
ascon.c
10
ascon.c
@ -150,9 +150,11 @@ static void AsconConnect(Ascon * a)
|
||||
ret = CreateSocketAdress(&adr, a->hostport, port);
|
||||
*colon = ':';
|
||||
if (ret == 0) {
|
||||
a->ip = 0;
|
||||
AsconError(a, "bad host specification", 0);
|
||||
return;
|
||||
}
|
||||
a->ip = adr.sin_addr.s_addr;
|
||||
oldopts = fcntl(a->fd, F_GETFL, 0);
|
||||
fcntl(a->fd, F_SETFL, oldopts | O_NONBLOCK);
|
||||
ret =
|
||||
@ -853,6 +855,14 @@ char *AsconHostport(Ascon *a)
|
||||
return a->hostport;
|
||||
}
|
||||
|
||||
unsigned long AsconIP(Ascon *a)
|
||||
{
|
||||
if (a==NULL) {
|
||||
return 0;
|
||||
}
|
||||
return a->ip;
|
||||
}
|
||||
|
||||
double AsconGetSetTimeout(Ascon *a, double timeout, int setmode) {
|
||||
if (setmode) {
|
||||
a->timeout = timeout;
|
||||
|
Reference in New Issue
Block a user