projects
/
my-code
/
ivac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added network_close_all function
[my-code/ivac.git]
/
src
/
network.c
diff --git
a/src/network.c
b/src/network.c
index
3579f5a
..
55fa2c6
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-163,6
+163,16
@@
int network_close(t_net *net,int channel) {
return(network_manage_connection(net)); /* could be other channel too */
}
return(network_manage_connection(net)); /* could be other channel too */
}
+int network_close_all(t_net *net) {
+
+ int channel;
+
+ for(channel=0;channel<MAX_CONNECTIONS;channel++)
+ if(net->connection[channel].status&C_ESTABL) network_close(net,channel);
+
+ return N_SUCCESS;
+}
+
int network_set_connection_info(t_net *net,int channel,char *ip,int port) {
if(net->connection[channel].status&C_IN_USE) {
int network_set_connection_info(t_net *net,int channel,char *ip,int port) {
if(net->connection[channel].status&C_IN_USE) {