# session.h ## **Overview** **Related Modules:** [Softbus](Softbus.md) **Description:** Declares unified data transmission interfaces. This file provides data transmission capabilities, including creating and removing a session server, opening and closing sessions, receiving data, and querying basic session information. After multiple nearby devices are discovered and networked, these interfaces can be used to transmit data across devices. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures
CreateSessionServer (const char *mouduleName, const char *sessionName, struct ISessionListener *listener) |
Creates a session server based on a module name and session name. |
RemoveSessionServer (const char *mouduleName, const char *sessionName) |
Removes a session server based on a module name and session name. |
SendBytes (int sessionId, const void *data, unsigned int len) |
|
GetMySessionName (int sessionId, char *sessionName, unsigned int len) |
Obtains the session name registered by the local device based on the session ID. |
GetPeerSessionName (int sessionId, char *sessionName, unsigned int len) |
Obtains the session name registered by the peer device based on the session ID. |
GetPeerDeviceId (int sessionId, char *devId, unsigned int len) |
|
CloseSession (int sessionId) |