Skip to content

Commit

Permalink
Add ">clientID"
Browse files Browse the repository at this point in the history
  • Loading branch information
DL6ER committed Mar 12, 2017
1 parent af4608f commit 1bea9ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,7 @@ memory allocated for internal data structure: 178688 bytes (178.69 KB)
dynamically allocated allocated memory used for strings: 15084 bytes (15.08 KB)
Sum: 193772 bytes (193.77 KB)
```
- `>clientID` : Get ID of currently connected client
```
6
```
9 changes: 9 additions & 0 deletions request.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,15 @@ void process_request(char *client_message, int *sock)
if(debugclients)
logg_int("Sent memory data to client, ID: ", *sock);
}
else if(command(client_message, ">clientID"))
{
processed = true;
sprintf(server_message,"%i\n", *sock);
swrite(server_message, *sock);

if(debugclients)
logg_int("Sent client ID to client, ID: ", *sock);
}

// End of queryable commands
if(processed)
Expand Down

0 comments on commit 1bea9ab

Please sign in to comment.