-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommand.e
More file actions
43 lines (34 loc) · 919 Bytes
/
Copy pathcommand.e
File metadata and controls
43 lines (34 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
note
description: "Summary description for {COMMAND}."
author: "Guillaume Hamel-Gagné"
date: "16 mai 2016"
revision: "1.2"
class
COMMAND
feature
connect(argument:STRING;network:RESEAU)
-- Routine pour la commande 'connect'. Afin de lancer une connection TCP.
do
network.client(argument)
end
host(network:RESEAU)
-- Routine pour la commande 'host'. Afin d'attendre un connection TCP.
do
network.host
end
msg(argument:STRING;network:RESEAU)
-- Routine pour la commande 'msg'. Afin d'ajouté un message à envoyé.
do
network.client_socket.put_string (argument)
--network.buffer_send.extend (argument)
end
read(network:RESEAU): detachable STRING
-- Cette fonction retourne le premier élément de la file `buffer_receive'.
local
first_item: detachable STRING
do
first_item:=network.buffer_receive.item
network.buffer_receive.remove
Result:=first_item
end
end