Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding only as transmitter or receiver #14

Open
mtfash opened this issue Apr 18, 2018 · 1 comment
Open

Binding only as transmitter or receiver #14

mtfash opened this issue Apr 18, 2018 · 1 comment

Comments

@mtfash
Copy link

mtfash commented Apr 18, 2018

Hello Adham,

Is it possible to bind only as Transmitter or Receiver? I know it is possible to bind using separate connections by using version 3.4 but that way it creates two separate connections at the same time. In my case I have two separate hosts for transmitter and receiver. In order to handle this I extended SmppClass like this, which forced me to change some fields to protected:

    public class PJSmppClient : SmppClient
    {
	private ClientType type;

	public PJSmppClient(ClientType type) : base()
	{
		this.type = type;
	}

	protected override void OpenSession(SessionBindInfo bindInfo, bool useSeparateConnections, int timeOut)
	{
		ChangeState(SmppConnectionState.Connecting);

		if (type == ClientType.Receiver)
		{
			//
		}
		else
		{
			//
		}
		ChangeState(SmppConnectionState.Connected);
	}
}

public enum ClientType
{
	Transmitter,
	Receiver
}
@mayurrrathod
Copy link

Hello Adam,
Can we use two separate port for transmitter and receiver in version 3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants