Các phương pháp của lớp này được sử dụng để gửi tin nhắn đến máy chủ. Bạn sẽ nhận thấy rằng hầu hết trong số họ được bảo vệ. Điều này là bởi vì các lớp khách hàng có thể truy cập một máy chủ sẽ thường xuất phát từ RSessionBase (ví dụ, lớp của RFS, cung cấp truy cập đến máy chủ tập tin). | Simpo PDF Merge and SplitUnregistered VersionR- http The methods of this class are used to send messages to the server. You ll notice that most of them are protected. This is because the client-side class which accesses a server will typically derive from RSessionBase for example class RFs which provides access to the file server . The derived class exports functions that wrap RSessionBase communication with the server and are more meaningful to potential clients of the server such as RFs Delete or RFs GetDir . The overloads of RSessionBase CreateSession start a new client-server session. They are typically called by client-side implementation code in an exported method such as Open or Connect . As an example when you start a session with the file server you call RFs Connect which itself calls RSessionBase Create-Session . When the session is opened successfully corresponding kernel and server-side objects are created. A server has a unique name which must be passed to RSession-Base CreateSession to connect the client to the correct server. Again the client-side implementation takes care of this so the calling client does not need to know the name of the server. CreateSession also takes a TVersion structure4 for compatibility support. You ll notice that one overload of CreateSession takes an integer parameter called aAsyncMessageSlots. This value reserves a number of slots to hold any outstanding asynchronous requests that client session may have with the The maximum number of slots that may be reserved for each server is 255. The other overload of CreateSession does not pre-allocate a maximum number of message slots. Instead they are taken from a kernel-managed pool of up to 255 message slots for that server which is available to the whole system. If the number of outstanding requests to a server exceeds the number of slots in the system pool or the number reserved for a particular session the asynchronous request fails to be submitted .