Example #1
0
/**
 * Set the value of Java's Socket::socketHandle.
 */
static void put_socket (JNIEnv *env,
                        jobject obj,
                        void *s)
{
    ensure_socket (env, obj);
    env->SetLongField (obj, socket_handle_fid, (jlong) s);
}
Example #2
0
File: Socket.cpp Project: aol/jzmq
/**
 * Get the value of Java's Socket::socketHandle.
 */
void *get_socket (JNIEnv *env,
                  jobject obj)
{
    ensure_socket (env, obj);
    void *s = (void*) env->GetLongField (obj, socket_handle_fid);
    return s;
}
Example #3
0
/**
 * Get the value of Java's Socket::socketHandle.
 */
static void *get_socket (JNIEnv *env,
                         jobject obj,
                         int do_assert)
{
    ensure_socket (env, obj);
    void *s = (void*) env->GetLongField (obj, socket_handle_fid);

    if (do_assert)
        assert (s);

    return s;
}