Skip to content

TCP/IP API #1987

@zephyrbot

Description

@zephyrbot

Reported by Flavio Santes:

Zephyr must provide a user friendly API for network programming. The basic functionality this new API must offer is:

  • Functions for setting the following properties: host IP address, netmask, default gateway address, peer address
  • Connection status
  • Listen for connections
  • Connect and disconnect from a server.
    Currently, there is no mechanism to inform that a connection is closing.
    However, this could be handled from upper layers (i.e. application). It would be convenient to analyze this case for Zephyr. See how Linux handles this.
  • Send and receive
    It must also indicate how many bytes are arriving without actually reading them

TCP-client mode

Furthermore, the following use-case must be supported:

(use-case #1)
Client connects to Server
Server accepts connection
Server sends application-level data
Client receives the data
Data could be sent by any party now

The previous described use-case is required to implement the NATS protocol and also cryptographic applications.
See [1], [2].

Currently, the only supported use-case is:

(use-case #2)
Client connects to Server
Server accepts connection
Client sends application-level data
Server receives the data
Data could be sent by any party now

TCP-server mode

Server mode must also support use-case #1. So far, only use-case #2 is supported in server mode.

[1] GH-2138
[2] GH-2256?focusedCommentId=12308&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12308

(Imported from Jira ZEP-437)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions