Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tarea2-RC-Grupo25-Cliente
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ramiro Facundo Lorenzo Rodriguez Inthamoussu
Tarea2-RC-Grupo25-Cliente
Commits
40160077
Commit
40160077
authored
7 years ago
by
Leonardo
Browse files
Options
Downloads
Patches
Plain Diff
Mayusculas y comparaciones
parent
6006d251
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cliente.cpp
+15
-5
15 additions, 5 deletions
src/cliente.cpp
with
15 additions
and
5 deletions
src/cliente.cpp
+
15
−
5
View file @
40160077
...
...
@@ -20,9 +20,9 @@
using
namespace
cv
;
/** CONSTANTES Y CONFIGURACION **/
const
char
delimiter
[]
=
"Grupo25"
;
const
int
keepAliveIntervalSeconds
=
30
;
const
int
keepAliveIntervalSeconds
=
5
;
const
bool
debug
=
false
;
// DEFINICION DE FUNCIONES
...
...
@@ -183,7 +183,7 @@ void UDP(char* HOSTNAME){
char
buffer
[
256
];
bzero
(
buffer
,
256
);
sprintf
(
buffer
,
"
subscription
"
);
sprintf
(
buffer
,
"
SUBSCRIPTION
"
);
// ENVIO PEDIDO DE SUSCRIPCION
printf
(
"Enviando Suscripcion a %s:%d ...
\n
"
,
HOSTNAME
,
UDP_PORT
);
::
fflush
(
stdout
);
...
...
@@ -306,14 +306,24 @@ const char* getIP(char* hostname){
return
ipAddress
;
}
char
*
upCase
(
char
*
arg
){
char
*
s
=
arg
;
unsigned
char
c
;
while
(
*
s
){
c
=
*
s
;
*
s
=
toupper
(
c
);
s
++
;
}
return
arg
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
// Register signals
signal
(
SIGINT
,
my_function
);
if
(
strcmp
(
argv
[
1
],
"TCP"
)
==
0
){
if
(
strcmp
(
upCase
(
argv
[
1
]
)
,
"TCP"
)
==
0
){
TCP
(
argv
[
2
]);
}
else
if
(
strcmp
(
argv
[
1
],
"UDP"
)
==
0
){
}
else
if
(
strcmp
(
upCase
(
argv
[
1
]
)
,
"UDP"
)
==
0
){
UDP
(
argv
[
2
]);
}
else
{
printf
(
"ERROR: primer argumento debe ser TCP o UDP.
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment