Git Product home page Git Product logo

bytexdigital.battleye.rcon's Issues

disconnects every 12m 56s

Hi,

I'm using your library (version 1.0.3-beta.4) in a .NET 6.0 project to control a DayZ server.
The client gets disconnected every 12 minutes and 56 seconds.

2021-12-13 16:13:55.532 INFO: Connected
2021-12-13 16:13:55.532 INFO: Server message: RCon admin #0 (127.0.0.1:57095) logged in
2021-12-13 16:26:51.629 INFO: Disconnected
2021-12-13 16:26:51.629 INFO: Connected
2021-12-13 16:26:51.630 INFO: Server message: RCon admin #1 (127.0.0.1:43417) logged in
2021-12-13 16:39:47.724 INFO: Disconnected
2021-12-13 16:39:47.725 INFO: Connected
2021-12-13 16:39:47.725 INFO: Server message: RCon admin #0 (127.0.0.1:38093) logged in
2021-12-13 16:52:43.832 INFO: Disconnected
2021-12-13 16:52:43.833 INFO: Connected
2021-12-13 16:52:43.833 INFO: Server message: RCon admin #1 (127.0.0.1:53917) logged in
2021-12-13 17:05:39.923 INFO: Disconnected
2021-12-13 17:05:39.923 INFO: Connected
2021-12-13 17:05:39.923 INFO: Server message: RCon admin #0 (127.0.0.1:49140) logged in
2021-12-13 17:18:36.013 INFO: Disconnected
2021-12-13 17:18:36.013 INFO: Connected
2021-12-13 17:18:36.014 INFO: Server message: RCon admin #1 (127.0.0.1:35456) logged in

Any idea what could be causing this?

Cheers
Phil

[DayZ] one instance connecting multiple times?

Hey,

opening the connection before the gameserver is ready (sometimes) seems to lead to multiple connections.

The code I'm using (excerpt):

try
{
	RconClient beClient = new(server.Ip, server.Port, server.Password);
	beClient.ReconnectInterval = 5000;
	beClient.Connected += (sender, args) => NetworkClient_Connected(sender, args);
	beClient.Disconnected += (sender, args) => NetworkClient_Disconnected(sender, args);
	beClient.MessageReceived += (sender, args) => NetworkClient_MessageReceived(sender, args);
	beClient.PlayerConnected += (sender, args) => NetworkClient_PlayerConnected(sender, args);
	beClient.PlayerDisconnected += (sender, args) => NetworkClient_PlayerDisconnected(sender, args);
	beClient.PlayerRemoved += (sender, args) => NetworkClient_PlayerRemoved(sender, args);

	bool initialConnectSuccessful = beClient.Connect();

	bool terminate = false;
	while (!terminate)
	{
		beClient.WaitUntilConnected();

		// [...]
		// do some stuff...
		// [...]

		Thread.Sleep(restartDelay * 1000);

		logger.Info("shutdown server...");
		beClient.Send(new ShutdownCommand());

		// the gameserver will be restarted by another program...

		Thread.Sleep(30000);
	}
}
catch (Exception ex)
{
	logger.Error(ex.ToString());
}

program output:

2022-11-04 08:53:03.266 INFO: Connected
2022-11-04 08:53:03.468 INFO: Server message: RCon admin #0 (127.0.0.1:57631) logged in
2022-11-04 08:53:03.468 INFO: Server message: RCon admin #0 (127.0.0.1:57631) logged in
2022-11-04 08:53:03.890 INFO: Server message: RCon admin #1 (127.0.0.1:37491) logged in
2022-11-04 08:53:03.890 INFO: Server message: RCon admin #1 (127.0.0.1:37491) logged in

gameserver output:

 8:53:03 Mission read.
 8:53:03 Connected to Steam
 8:53:03 Steam policy response
 8:53:03 BattlEye Server: RCon admin #0 (127.0.0.1:57631) logged in
 8:53:03 BattlEye Server: RCon admin #1 (127.0.0.1:37491) logged in

Both connections seem to be "alive", because both receive the NetworkClient_MessageReceived event (duplicates in program output).
However, one of those connections seems to "die", because after X seconds (can't tell exactly) there are no more duplicate log messages, just one per event (as expected).

Any ideas?

Thanks

GetMissionsRequest doese not realized

GetMissionsRequest doese not realized

RconClient networkClient = new RconClient("192.168.1.1", 2344, "pswd");

            bool requestSuccess = networkClient.Fetch(
                command: new GetMissionsRequest(),
                timeout: 5000,
                result: out string missions);

InvalidOperationException

Help a noob

Hey, anyone interested in helping out a noob here please?

I've got a little launcher setup in VS c# and im trying to connect to a Dayz server just to show how many players are online.
That's all I'm trying to do and i just cant get it to work hehe.. anyone able to share some coding which i can use to show online players in a textbox or label or something please?

SocketException

Yeah it seems like there is an issue in the BytexDigital.BattlEye.Rcon.NetworkConnection class.

Here is the full error:

Anwendung: EvoRCON.exe
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: System.Net.Sockets.SocketException
bei System.Net.Sockets.Socket.DoBeginReceiveFrom(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags, System.Net.EndPoint, System.Net.SocketAddress, System.Net.Sockets.OverlappedAsyncResult)
bei System.Net.Sockets.Socket.BeginReceiveFrom(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags, System.Net.EndPoint ByRef, System.AsyncCallback, System.Object)
bei System.Net.Sockets.UdpClient.BeginReceive(System.AsyncCallback, System.Object)
bei System.Threading.Tasks.TaskFactory1[[System.Net.Sockets.UdpReceiveResult, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].FromAsyncImpl(System.Func3<System.AsyncCallback,System.Object,System.IAsyncResult>, System.Func2<System.IAsyncResult,System.Net.Sockets.UdpReceiveResult>, System.Action1<System.IAsyncResult>, System.Object, System.Threading.Tasks.TaskCreationOptions)
bei System.Net.Sockets.UdpClient.ReceiveAsync()
bei BytexDigital.BattlEye.Rcon.NetworkConnection+d__21.MoveNext()
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
bei System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
bei System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
bei System.Threading.ThreadPoolWorkQueue.Dispatch()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.