Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
memcpy(ret, buf.c_str(), sz);
return ret;
}
else
return nullptr;
}
void i2psam_socket_close(struct i2psam_socket *sock)
{
sock->impl->close();
}
int i2psam_socket_is_ok(struct i2psam_socket * sock)
{
if(sock->impl->isOk())
return 1;
else
return 0;
}
void i2psam_socket_free(struct i2psam_socket * sock)
{
delete sock;
}
const char * i2psam_destination_priv(struct i2psam_destination * dest)
{
return strdup(dest->priv);
}
const char * i2psam_destination_pub(struct i2psam_destination * dest)
{
return strdup(dest->pub);
}
void i2psam_destination_free(struct i2psam_destination * dest)
{
free(dest->pub);
free(dest->priv);
delete dest;
}
}