Can I reject connection in the SmppServer

Post Reply
chengcti
Posts: 6
Joined: Wed Jul 21, 2021 12:24 pm

Can I reject connection in the SmppServer

Post by chengcti » Fri Aug 12, 2022 5:57 am

I want to create a black list in the smppserver.
Because I monitor someone connect to server every 30 second.
It never sends any authentication information to server. Of course, onbind never gets fired.

Can I deny unknown connections in OnConnected Event()?

The virtual code like it.
Unknow source connect to smppserver.
void OnClientConnectedEventHandler(object sender, SmppServerClient client);
{
if (client.ip = "aa.bb.cc.dd")
{
client. Disconnect();
{
}

If I don't terminate the unknown connection.
Will the component help me to terminate it if the connection doesn't call the smppserver.OnBind() event.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Can I reject connection in the SmppServer

Post by alt » Wed Aug 17, 2022 9:14 pm

Yes, you can deny the connections. You need to check client.RemoteEndPoint in the evClientConnected event.
Post Reply