@@ -45,6 +45,10 @@ package AWS.Net.WebSocket is
4545
4646 type Object is new Net.Socket_Type with private ;
4747 type Object_Class is access all Object'Class;
48+ -- To implement your own handling of messages, you need to extend this
49+ -- 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).
4852
4953 No_Object : constant Object'Class;
5054
@@ -88,7 +92,7 @@ package AWS.Net.WebSocket is
8892 -- This function must be registered via AWS.Net.WebSocket.Registry.Register
8993
9094 procedure On_Message (Socket : in out Object; Message : String) is null ;
91- -- Default implementation does nothing, it needs to be overriden by the
95+ -- Default implementation does nothing, it needs to be overridden by the
9296 -- end-user. This is the callback that will get activated for every server
9397 -- incoming data. It is also important to keep in mind that the thread
9498 -- handling this WebSocket won't be released until the procedure returns.
@@ -97,11 +101,11 @@ package AWS.Net.WebSocket is
97101
98102 procedure On_Message (Socket : in out Object; Message : Unbounded_String);
99103 -- Same a above but takes an Unbounded_String. This is supposed to be
100- -- overriden when handling large messages otherwise a stack-overflow could
101- -- be raised. The default implementation of this procedure to to call the
104+ -- overridden when handling large messages otherwise a stack-overflow could
105+ -- be raised. The default implementation of this procedure to call the
102106 -- On_Message above with a string.
103107 --
104- -- So either this version is overriden to handle the incoming messages or
108+ -- So either this version is overridden to handle the incoming messages or
105109 -- the one above if the messages are known to be small.
106110
107111 procedure On_Open (Socket : in out Object; Message : String) is null ;
@@ -119,7 +123,7 @@ package AWS.Net.WebSocket is
119123 (Socket : in out Object;
120124 Message : String;
121125 Is_Binary : Boolean := False);
122- -- This default implementation just send a message to the client. The
126+ -- This default implementation just sends a message to the client. The
123127 -- message is sent in a single chunk (not fragmented).
124128
125129 procedure Send
@@ -167,7 +171,7 @@ package AWS.Net.WebSocket is
167171 --
168172 -- These function waits until it either receives a close or an error, or
169173 -- the beginning of a message frame. In the latter case, the function
170- -- will then block until it has receives all chunks of that frame, which
174+ -- will then block until it has received all chunks of that frame, which
171175 -- might take longer than Timeout.
172176 --
173177 -- The function will return early if it doesn't receive the beginning
0 commit comments