-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
103 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace SapNwRfc.Internal.Interop | ||
{ | ||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] | ||
internal struct RfcServerAttributes | ||
{ | ||
public IntPtr ServerName; | ||
|
||
[MarshalAs(UnmanagedType.I4)] | ||
public SapRfcProtocolType Type; | ||
|
||
[MarshalAs(UnmanagedType.U4)] | ||
public uint RegistrationCount; | ||
|
||
[MarshalAs(UnmanagedType.I4)] | ||
public SapRfcServerState State; | ||
|
||
[MarshalAs(UnmanagedType.U4)] | ||
public uint CurrentBusyCount; | ||
|
||
[MarshalAs(UnmanagedType.U4)] | ||
public uint PeakBusyCount; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace SapNwRfc | ||
{ | ||
/// <summary> | ||
/// Represents the SAP RFC server protocol. | ||
/// </summary> | ||
public enum SapRfcProtocolType | ||
{ | ||
RFC_UNKOWN, | ||
RFC_CLIENT, | ||
RFC_STARTED_SERVER, | ||
RFC_REGISTERED_SERVER, | ||
RFC_MULTI_COUNT_REGISTERED_SERVER, | ||
RFC_TCP_SOCKET_CLIENT, | ||
RFC_TCP_SOCKET_SERVER, | ||
RFC_WEBSOCKET_CLIENT, | ||
RFC_WEBSOCKET_SERVER, | ||
RFC_PROXY_WEBSOCKET_CLIENT, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Runtime.InteropServices; | ||
using SapNwRfc.Internal.Interop; | ||
|
||
namespace SapNwRfc | ||
{ | ||
public sealed class SapServerAttributes | ||
{ | ||
private readonly RfcServerAttributes _serverAttributes; | ||
|
||
internal SapServerAttributes(RfcServerAttributes serverAttributes) | ||
{ | ||
_serverAttributes = serverAttributes; | ||
ServerName = Marshal.PtrToStringAuto(serverAttributes.ServerName); | ||
} | ||
|
||
public string ServerName { get; } | ||
|
||
public SapRfcProtocolType Type => _serverAttributes.Type; | ||
|
||
public uint RegistrationCount => _serverAttributes.RegistrationCount; | ||
|
||
public SapRfcServerState State => _serverAttributes.State; | ||
|
||
public uint CurrentBusyCount => _serverAttributes.CurrentBusyCount; | ||
|
||
public uint PeakBusyCount => _serverAttributes.PeakBusyCount; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters