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

I do not receive messages #12

Open
cla78 opened this issue Jul 6, 2024 · 4 comments
Open

I do not receive messages #12

cla78 opened this issue Jul 6, 2024 · 4 comments

Comments

@cla78
Copy link

cla78 commented Jul 6, 2024

Hi,
I tried your tcp server, setting it up as explained.

internal class Program
 {
     static void Main(string[] args)
     {
           Console.WriteLine("Server Started...!");

         TcpNETServer server = new TcpNETServer(new ParamsTcpServer(8989, "\r\n", "Connected Successfully"));
         server.MessageEvent += Server_MessageEvent;

         server.StartAsync();

         Console.ReadKey();
     }

     private static void Server_MessageEvent(object sender, Tcp.NET.Server.Events.Args.TcpMessageServerEventArgs args)
     {
     }
 }

I connect with Hercules but receive no message ,
Could you help me understand what's wrong?

Thanks

@Sundarkdk
Copy link

Hi cla78 all messages received by the server have to end with "EndOfLine" espcified in ParamsTcpServer, in this case with "\r\n".

@cla78
Copy link
Author

cla78 commented Jul 8, 2024

I do not know what I am doing wrong.
The project is in net core 8 on console application and topshelf.
Even if I put the end-of-line characters at each send, I get nothing.
Connection, disconnection, error, boot/stop events are triggered but never the message event.

I attach a short video.
Video and iimplementation.zip

Thanks,
Claudio

@Sundarkdk
Copy link

Sundarkdk commented Jul 8, 2024

Hi Claudio, your code is ok, is hercules. try send messages in hercules with ends < "CR"><"LF">, example: Hello world<"CR"><"LF">. Use it without "".

@cla78
Copy link
Author

cla78 commented Jul 9, 2024

Hi,
I changed the testsoftware by replacing Hercules with AutoID Terminal and now it works.

Thank you for your helpfulness and sorry for wasting your time.

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