NetServices move to native code
This commit is contained in:
1 parent
db8b0124d2
commit
58f8755835
3 files changed
+34
-102
No files matched your search
@@ -960,6 +960,20 @@ JNIEXPORT jstring SIGAR_JNIx(getNetListenAddress)
|
||||
return jnet_address_to_string(env, sigar, &address);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring SIGAR_JNIx(getNetServicesName)
|
||||
(JNIEnv *env, jobject sigar_obj, jint protocol, jlong port)
|
||||
{
|
||||
char *name;
|
||||
dSIGAR(NULL);
|
||||
|
||||
if ((name = sigar_net_services_name_get(sigar, protocol, port))) {
|
||||
return JENV->NewStringUTF(env, name);
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT jstring SIGAR_JNI(NetConnection_getTypeString)
|
||||
(JNIEnv *env, jobject obj)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user