Add funcshion net_start, net_work. Create struct net_queue.
Add function cl_net_processing_event: watch net queue.
Add function net_start: initialization network, filling struct net, create pthread for modul net
Add function net_work: watch status socket
Add function net_send_placement: takes configure and net_placement to place it into the new queue if configure->mutex is not locked, else waiting for unlock and do the same things
Add functiuon net_send_shot: takes configure and shot coordinates to place it into the new queue if configure->mutex is not locked, else waiting for unlock and do the same things
Add function net_send_nick: takes configure and nick to place it into the new queue if configure->mutex is not locked, else waiting for unlock and do the same things
Add function net_send_start: takes configure to place it into the new queue if configure->mutex is not locked, else waiting for unlock and do the same things
Add function net_send_error: takes configure and net_error to place it into the new queue if configure->mutex is not locked, else waiting for unlock and do the same things
Add function net_send_end: takes configure to place it into the new queue if configure->mutex is not locked, else waiting for unlock and do the same things
Add function net_add_queue: if mutex is not locked then the element will be added to the net queue
Add function net_del_queue: deletes the first element of the net queue
Add function net_recv: receives information from net server module, takes configure to place received information into the main queue in case when recv returns an error then in main queue will be added an error number from errnoor -1 if the server has closed connection
Changed allmost every function captions from net_* to cl_net_*
Now functions: cl_net_send_placement, cl_net_send_shot,
cl_net_send_nick, cl_net_send_start, cl_net_send_error and
cl_net_send_end are not using mutexes. Now mutexes are using in
cl_net_add_queue.
.
cl_net_add_queue header was changed
from
cl_net_add_queue(struct net_queue *net_queue_head, struct net_queue *element);
to
cl_net_add_queue(struct net *configure, struct net_queue *element);
cl_net_prosseing_event has been finished
Added include client.h in cl_gui.h
replacement int for char in function placement
renamed some functions
added srv_logic_ in function
Added function placement_received
Add comments in cl_main.c
Add redefine protection for client.h
repleced all the value of the array structure
_test
Merge branch 'master' of https://github.com/eltex-stud/battleship
Merge branch 'master' of https://github.com/eltex-stud/battleship
Bugfix