Changes

379 bytes added ,  17:56, 28 January 2016
no edit summary
Line 2: Line 2:     
= Concepts =
 
= Concepts =
 +
 +
== Sessions ==
 +
 +
Sessions are communication channels consisting of a client and server, through which data can be exchanged in the form of a request and response, respectively. Through sessions, the standard [[#Command Structure|IPC command protocol]] is implemented. Clients use their client session handle to send IPC commands to the server using svcSendSyncRequest, while servers use svcReplyAndReceive to reply. In both cases, the kernel takes care of transferring IPC command data from the [[Thread Local Storage]] of the sending process to the TLS of the receiving process. Sessions can be created through svcCreateSession, which provides the caller with the client and server handles. These are used in their raw form to implement [[Filesystem services#File service|file handles]].
    
== Ports ==
 
== Ports ==
Line 10: Line 14:     
Services are an abstraction of ports that can not be connected to through ConnectToPort, as the underlying port is an anonymous port created by [[Services|service manager]]. Clients are instead expected to open a session using the service manager ("srv:") port command GetServiceHandle. A service is registered with service manager using the command RegisterService.
 
Services are an abstraction of ports that can not be connected to through ConnectToPort, as the underlying port is an anonymous port created by [[Services|service manager]]. Clients are instead expected to open a session using the service manager ("srv:") port command GetServiceHandle. A service is registered with service manager using the command RegisterService.
  −
== Sessions ==
  −
  −
Sessions are communication channels opened on a specific port. Clients use their session handle to send [[#IPC_Command_Structure|IPC commands]] to the server using SendSyncRequest, while servers use ReplyAndReceive to reply. In both cases, the kernel takes care of transferring IPC command data from the [[Thread_Local_Storage|TLS]] of the sending process to the TLS of the receiving process.
      
= Command Structure =
 
= Command Structure =
254

edits