Skip to content

Bug with the default port of the client (8888) and server (8080) #6

@apeash

Description

@apeash

https://github.com/mosharaf/eecs489/tree/w25/Discussion/ds3-echoserver

It says:

./echoserver
-p [server-port] (Default: 8888)

But ./echoserver accidentally defaults to port 8080 defined in echoserver.cpp (#define DEFAULT_SERVER_PORT 8080), while ./client defaults to port 8888 defined in network_utils.h (const unsigned int DEFAULT_SERVER_PORT = 8888;).

echoserver.cpp:
// Default port defined somewhere in your project (or define it here)
#ifndef DEFAULT_SERVER_PORT
#define DEFAULT_SERVER_PORT 8080
#endif

This #ifndef block keeps unnecessarily running because it's expecting a macro (#define DEFAULT_SERVER_PORT 8888) but in network_utils.h the default server port is defined as a variable (const unsigned int DEFAULT_SERVER_PORT = 8888;).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions