Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8201037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:39:58+00:00 2026-06-07T06:39:58+00:00

I have one open-source sample, which is working but i am not able to

  • 0

I have one open-source sample, which is working but i am not able to understand where is the TCP/UDP connection happening? HHNET_LogonServer

test.c:

#include "HHNet.h"
#include "HHDecoder.h"

#include "stdio.h"
#include <unistd.h> 
#include <pthread.h>
#include <netinet/in.h>

...

int main(int argc, char **argv) {
    HHERR_CODE      errCode;
    unsigned long   dwTmp;
    unsigned int    nPort;

    errCode     = HHERR_FAILURE;

    if (argc < 4) {
        printf("Usage:<./SDKDemo> <IP> <Username> <Password> <Data port>\n");
        exit(0);
    } else {
        dwTmp = strlen(*(argv + 1));
        if ( (dwTmp > 7) && (dwTmp < 15 )) {
            g_pIPString = (*(argv + 1));
        } else {
            printf("Invalid IP !\n");
        }
        g_pUseName  = argv[2];
        g_pPASSWD   = argv[3];

        if ((nPort = atoi(argv[4])) > 0) {
            g_lPort = nPort;
        }
    }

    errCode = HHNET_Startup(5000, LogonNotifyCallback, CheckUserPswCallback, UpdateFileCallback, ServerMsgCmdCallback, StreamWriteCheckCallback, (ChannelStreamCallback)PreviewStreamCallback);
    printf(">HHNET_Startup: %s\n", errCode?"Failed!":"Successful!");

    HANDLE m_hLogonServer;  
    errCode = HHNET_LogonServer(g_pIPString, g_lPort, "admin", g_pUseName, g_pPASSWD, 0, &m_hLogonServer);
    printf(">HHNET_LogonServer: %s\n",errCode?"Failed!":"Successful!");

    errCode = HHNET_LogoffServer(m_hLogonServer);

    if (errCode) {
        printf("Error code:%d\n", errCode);
        printf(">HHNET_LogoffServer: Failed!\n");
    } else  {
        printf(">HHNET_LogoffServer: Successful!\n");
    }
     HHNET_Cleanup();
     return 0;
}

HHNet.h: ( https://gist.github.com/3067481 )

HHERR_CODE      HHNET_LogonServer(IN  CHAR *pServerIP,IN  UINT nServerPort,IN  CHAR *pDeviceName,IN  CHAR *pUserName,IN  CHAR *pUserPassword,IN UINT dwClientID,OUT  HANDLE *hLogonServer);

HHDecoder.h: ( https://gist.github.com/3067481 )

Output:

$ ./test 192.168.0.199 admin admin 5000
sh: /proc/sys/net/ipv4/tcp_keepalive_time: Permission denied
sh: /proc/sys/net/ipv4/tcp_keepalive_intvl: Permission denied
sh: /proc/sys/net/ipv4/tcp_keepalive_probes: Permission denied
>HHNET_Startup: Successful!
--->|   HHNET_LogonServer :192.168.0.199
>HHNET_LogonServer: Successful!
>HHNET_LogoffServer: Successful!

But i can not figure out where is this trigger happening --->| HHNET_LogonServer :192.168.0.199

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:39:59+00:00Added an answer on June 7, 2026 at 6:39 am

    You said it in your question

    HHNET_LogonServer(IN  CHAR *pServerIP,IN  UINT nServerPort,IN  CHAR *pDeviceName,IN  CHAR *pUserName,IN  CHAR *pUserPassword,IN UINT dwClientID,OUT  HANDLE *hLogonServer);
    

    Inside this function, a socket is created and connected to the remote.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm hearing that is better to have one connection open upon app start up
I have my own RTSP Source Filter solution which is still under development but
I have an open source project which is hosted on Github. I want to
I have one windows form file that each time I open it in Visual
I have one line in php file like this: <a class=hide-if-no-js onclick=findPosts.open( 'media[]','<?php echo
I have one project with is developed in Php and javascript. How to open
I have two pages. First one we open with $_POST variables in its url,
I have a normal NavigationController. When i open one modalView (using segues) and dismiss
I have a Folder with about 1000 Projects . So to open one, it's
I'm working on a little game called freegemas , it's an open source version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.