This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can I use both TCP native sockets and BSD sockets?

First of all, I'm using RL-NET V4 Legacy, MDK 5.25. And the uC I am using is the ARM7 LPC2468.

The system I'm programming uses "a lot" of sockets. It has:

- Default TCPNET HTTP server up to 3 sessions;
- Default TCPNET FTP server 1 session;
- A custom server for custom communications - up to 30 client TCPNET socket connections (Maintained by "Custom Comm" Task);
- 1 TCPNET UDP socket for logging messages through the network to a specific logging app (logs from several tasks!);
- 1 Default TCPNET DNS client.

And it has 2 BSD sockets:

- 1 BSD TCP socket for SQL querying (Maintained by "Database Querying" Task);
- 1 BSD TCP socket for Internet communications / RESTful (Maintained by "Replication" Task);

All the TCPNET native sockets are used within the WebMain Task, and they are maintained through events/mailboxes shared between the WebMain Task and the other Tasks.
In contrast with that, each BSD socket is used within each individual task, not in the WebMain Task.

The documentation just says that TCPNET NATIVE sockets must be dealt with in the Web Main Task, since it's functions are non-reentrant. 
Meanwhile, it says the BSD sockets support concurrency. It also says that BSD sockets are based on the TCP native sockets. 

The reason I use both BSD and TCP native sockets is because in the beginning the development used only TCP native sockets, then we realised that for other new tasks it was easier to do by using BSD sockets.

But the question is, can I use both? Or I must stick with one of the them?

Parents
  • Thank you for your promptness and helping. We appreciate it very much!

    Unfortunately we are not calling these functions from anywhere else in the code, we've searched and looked everywhere in the project.
    The only place it's being called, that we have access to, is inside the ETH interrupt handler, which is posted in my last comment.

    We've deactivated the FTP and HTTP native servers to reduce the options.
    So now we're only using the logger socket (native socket) inside the Main TCPnet Task, and 2 BSD sockets in other 2 Tasks (SQL Task and Replication Task).

    We're still getting the exception ERR_MEM_LOCK.

    Do you have any suggestions?

Reply
  • Thank you for your promptness and helping. We appreciate it very much!

    Unfortunately we are not calling these functions from anywhere else in the code, we've searched and looked everywhere in the project.
    The only place it's being called, that we have access to, is inside the ETH interrupt handler, which is posted in my last comment.

    We've deactivated the FTP and HTTP native servers to reduce the options.
    So now we're only using the logger socket (native socket) inside the Main TCPnet Task, and 2 BSD sockets in other 2 Tasks (SQL Task and Replication Task).

    We're still getting the exception ERR_MEM_LOCK.

    Do you have any suggestions?

Children