bugThe eXtended osip library - Bugs: bug #62521, exosip2.5.3.0 Unable to receive...

 
 

bug #62521: exosip2.5.3.0 Unable to receive any packets as TCP server

Submitter:  None
Submitted:  Wed 25 May 2022 12:05:44 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  aymeric
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 13 Apr 2023 05:07:41 PM UTC, comment #1: 

-sorry for not replying, sometimes I don't receive the savannah notifications-

In order to receive data in eXosip2, the code need to be compiled with -DENABLE_MAIN_SOCKET

NOTE: eXosip2 is mostly implemented and tested for "client". Some people are using it successfully as "server", but I'm not myself testing it this way, so any report is welcome.

Aymeric MOIZARD <aymeric>
Group administrator
Wed 25 May 2022 12:05:44 PM UTC, original submission:  

tcp server codeļ¼š
_eTcpCtx = eXosip_malloc();
    if (!_eTcpCtx) {
        ErrorL << "eXosip_malloc tcp failed";
        return -1;
    }

    int32_t result = -1;
    result = eXosip_init(_eTcpCtx);
    if (result != OSIP_SUCCESS) {
        ErrorL << "eXosip_init failed";
        osip_free(_eTcpCtx);
        _eTcpCtx = nullptr;
        return -1;
    }

    eXosip_set_user_agent(_eTcpCtx, _gbsAgentName.c_str());
    InfoL << "eXosip_init tcp success";
    result = eXosip_listen_addr(_eTcpCtx,
                                IPPROTO_TCP,
                                nullptr,
                                _gbsConfig.port,
                                AF_INET,
                                0);
    if (result != OSIP_SUCCESS) {
        ErrorL << "eXosip_listen_addr failed";
        eXosip_reset_transports(_eTcpCtx);
        eXosip_quit(_eTcpCtx);
        osip_free(_eTcpCtx);
        _eTcpCtx = nullptr;
        return -1;
    }


while (!_isNeedStop) {
        eXosip_event_t *event = nullptr;
        event = eXosip_event_wait(peCtx, 0, 0);
        if (!event) {
            osip_usleep(100000);
            continue;
        }

        dispatchEvent(peCtx, event);
        eXosip_event_free(event);
    }


tcp port listeningļ¼š
gbs       9086 xxx   31u  IPv4 0xb4942c651d611321      0t0  UDP *:30000
gbs       9086 xxx   37u  IPv4 0xb4942c605c9128f9      0t0  TCP *:30000 (LISTEN)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by aymeric (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-13 aymeric StatusNone Works For Me
        Assigned toNone aymeric
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code