|
| Listener (Func< Socket, Task > _ConnectCallBack) |
|
bool | PortInUse (int port) |
| Checks if the specified port is in use.
|
|
void | CreateListener (int port) |
| Creates a listener on the specified port and starts listening for incoming connections.
|
|
void | StopListener (int port) |
| Stops the listener on the specified port.
|
|
◆ Listener()
xeno_rat_server.Listener.Listener |
( |
Func< Socket, Task > | _ConnectCallBack | ) |
|
|
inline |
◆ CreateListener()
void xeno_rat_server.Listener.CreateListener |
( |
int | port | ) |
|
|
inline |
Creates a listener on the specified port and starts listening for incoming connections.
- Parameters
-
port | The port number on which to create the listener. |
- Exceptions
-
System.InvalidOperationException | Thrown when the specified port is already in use. |
This method checks if the specified port is in use. If the port is available, it creates a new listener and starts listening for incoming connections using the specified port . If an error occurs during the process, the listener is stopped, and an error message is displayed.
◆ PortInUse()
bool xeno_rat_server.Listener.PortInUse |
( |
int | port | ) |
|
|
inline |
Checks if the specified port is in use.
- Parameters
-
port | The port number to be checked. |
- Returns
- True if the port is in use; otherwise, false.
◆ StopListener()
void xeno_rat_server.Listener.StopListener |
( |
int | port | ) |
|
|
inline |
Stops the listener on the specified port.
- Parameters
-
port | The port number on which the listener is running. |
This method stops the listener running on the specified port .
◆ ConnectCallBack
Func<Socket, Task> xeno_rat_server.Listener.ConnectCallBack |
|
private |
◆ listeners
Dictionary<int, _listener> xeno_rat_server.Listener.listeners = new Dictionary<int, _listener>() |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/xeno rat server/Listener.cs