@@ -47,8 +47,8 @@ package AWS.Net.WebSocket is
4747 type Object_Class is access all Object'Class;
4848 -- To implement your own handling of messages, you need to extend this
4949 -- type and override at least the On_Message primitive operation.
50- -- In addition, you need to register a factory (to create new objects based
51- -- on the URI) using AWS.Net.WebSocket.Registry.Register).
50+ -- In addition, you need to register a factory (to create new objects
51+ -- based on the URI) using AWS.Net.WebSocket.Registry.Register).
5252
5353 No_Object : constant Object'Class;
5454
@@ -81,16 +81,6 @@ package AWS.Net.WebSocket is
8181 -- the default Send implementation should be ok for most usages.
8282 --
8383
84- function Create
85- (Socket : Socket_Access;
86- Request : AWS.Status.Data) return Object'Class
87- with Pre => Socket /= null ;
88- -- Create a new instance of the WebSocket, this is used by AWS internal
89- -- server to create a default WebSocket if no other constructor are
90- -- provided. It is also needed when deriving from WebSocket.
91- --
92- -- This function must be registered via AWS.Net.WebSocket.Registry.Register
93-
9484 procedure On_Message (Socket : in out Object; Message : String) is null ;
9585 -- Default implementation does nothing, it needs to be overridden by the
9686 -- end-user. This is the callback that will get activated for every server
@@ -259,6 +249,20 @@ package AWS.Net.WebSocket is
259249 -- Returns a unique id for the given socket. The uniqueness for this socket
260250 -- is guaranteed during the lifetime of the application.
261251
252+ -- ---------------------
253+ -- Internal services --
254+ -- ---------------------
255+ -- These subprograms are used internally by AWS, and do not need to be
256+ -- called explicitly in user code.
257+
258+ procedure Setup_Socket
259+ (WS : not null Object_Class;
260+ Socket : not null Socket_Access;
261+ Request : AWS.Status.Data);
262+ -- Setup WS.
263+ -- It will be called automatically for any websocket returned by a factory,
264+ -- so in general you do not need to call it explicitly.
265+
262266private
263267
264268 type Internal_State is record
@@ -350,6 +354,8 @@ private
350354 (Socket : Object; Size : Natural) is null ;
351355
352356 overriding procedure Free (Socket : in out Object);
357+ -- This is called automatically when the socket is no longer needed, do not
358+ -- call directly from user code.
353359
354360 No_UID : constant UID := 0 ;
355361
0 commit comments