| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 180e99c commit fd4fdc0
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # Specify version format | |
| 2 | - version: "3.0.11.{build}" | ||
| 2 | + version: "3.0.12.{build}" | ||
| 3 | 3 | ||
| 4 | 4 | # Image to use | |
| 5 | 5 | image: Visual Studio 2019 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | <PropertyGroup> | |
| 4 | 4 | <TargetFramework>netstandard2.1</TargetFramework> | |
| 5 | - <Version>3.0.11</Version> | ||
| 5 | + <Version>3.0.12</Version> | ||
| 6 | 6 | <Authors>Ivan Shynkarenka</Authors> | |
| 7 | 7 | <Copyright>Copyright (c) 2019-2020 Ivan Shynkarenka</Copyright> | |
| 8 | 8 | <RepositoryUrl>https://github.com/chronoxor/NetCoreServer</RepositoryUrl> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,49 +98,11 @@ public SslClient(SslContext context, IPEndPoint endpoint) | |||
| 98 | 98 | /// <summary> | |
| 99 | 99 | /// Option: receive buffer size | |
| 100 | 100 | /// </summary> | |
| 101 | - public int OptionReceiveBufferSize | ||
| 102 | - { | ||
| 103 | - get => Socket.ReceiveBufferSize; | ||
| 104 | - set => Socket.ReceiveBufferSize = value; | ||
| 105 | - } | ||
| 101 | + public int OptionReceiveBufferSize { get; set; } = 8192; | ||
| 106 | 102 | /// <summary> | |
| 107 | 103 | /// Option: send buffer size | |
| 108 | 104 | /// </summary> | |
| 109 | - public int OptionSendBufferSize | ||
| 110 | - { | ||
| 111 | - get => Socket.SendBufferSize; | ||
| 112 | - set => Socket.SendBufferSize = value; | ||
| 113 | - } | ||
| 114 | - /// <summary> | ||
| 115 | - /// Option: receive timeout in milliseconds | ||
| 116 | - /// </summary> | ||
| 117 | - /// <remarks> | ||
| 118 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 119 | - /// </remarks> | ||
| 120 | - public int OptionReceiveTimeout | ||
| 121 | - { | ||
| 122 | - get => Socket.ReceiveTimeout; | ||
| 123 | - set => Socket.ReceiveTimeout = value; | ||
| 124 | - } | ||
| 125 | - /// <summary> | ||
| 126 | - /// Option: send timeout in milliseconds | ||
| 127 | - /// </summary> | ||
| 128 | - /// <remarks> | ||
| 129 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 130 | - /// </remarks> | ||
| 131 | - public int OptionSendTimeout | ||
| 132 | - { | ||
| 133 | - get => Socket.SendTimeout; | ||
| 134 | - set => Socket.SendTimeout = value; | ||
| 135 | - } | ||
| 136 | - /// <summary> | ||
| 137 | - /// Option: linger state | ||
| 138 | - /// </summary> | ||
| 139 | - public LingerOption OptionLingerState | ||
| 140 | - { | ||
| 141 | - get => Socket.LingerState; | ||
| 142 | - set => Socket.LingerState = value; | ||
| 143 | - } | ||
| 105 | + public int OptionSendBufferSize { get; set; } = 8192; | ||
| 144 | 106 | ||
| 145 | 107 | #region Connect/Disconnect client | |
| 146 | 108 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,6 +107,14 @@ public SslServer(SslContext context, IPEndPoint endpoint) | |||
| 107 | 107 | /// This option will enable/disable SO_EXCLUSIVEADDRUSE if the OS support this feature | |
| 108 | 108 | /// </remarks> | |
| 109 | 109 | public bool OptionExclusiveAddressUse { get; set; } | |
| 110 | + /// <summary> | ||
| 111 | + /// Option: receive buffer size | ||
| 112 | + /// </summary> | ||
| 113 | + public int OptionReceiveBufferSize { get; set; } = 8192; | ||
| 114 | + /// <summary> | ||
| 115 | + /// Option: send buffer size | ||
| 116 | + /// </summary> | ||
| 117 | + public int OptionSendBufferSize { get; set; } = 8192; | ||
| 110 | 118 | ||
| 111 | 119 | #region Start/Stop server | |
| 112 | 120 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,8 @@ public SslSession(SslServer server) | |||
| 21 | 21 | { | |
| 22 | 22 | Id = Guid.NewGuid(); | |
| 23 | 23 | Server = server; | |
| 24 | + OptionReceiveBufferSize = server.OptionReceiveBufferSize; | ||
| 25 | + OptionSendBufferSize = server.OptionSendBufferSize; | ||
| 24 | 26 | } | |
| 25 | 27 | ||
| 26 | 28 | /// <summary> | |
@@ -57,49 +59,11 @@ public SslSession(SslServer server) | |||
| 57 | 59 | /// <summary> | |
| 58 | 60 | /// Option: receive buffer size | |
| 59 | 61 | /// </summary> | |
| 60 | - public int OptionReceiveBufferSize | ||
| 61 | - { | ||
| 62 | - get => Socket.ReceiveBufferSize; | ||
| 63 | - set => Socket.ReceiveBufferSize = value; | ||
| 64 | - } | ||
| 62 | + public int OptionReceiveBufferSize { get; set; } = 8192; | ||
| 65 | 63 | /// <summary> | |
| 66 | 64 | /// Option: send buffer size | |
| 67 | 65 | /// </summary> | |
| 68 | - public int OptionSendBufferSize | ||
| 69 | - { | ||
| 70 | - get => Socket.SendBufferSize; | ||
| 71 | - set => Socket.SendBufferSize = value; | ||
| 72 | - } | ||
| 73 | - /// <summary> | ||
| 74 | - /// Option: receive timeout in milliseconds | ||
| 75 | - /// </summary> | ||
| 76 | - /// <remarks> | ||
| 77 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 78 | - /// </remarks> | ||
| 79 | - public int OptionReceiveTimeout | ||
| 80 | - { | ||
| 81 | - get => Socket.ReceiveTimeout; | ||
| 82 | - set => Socket.ReceiveTimeout = value; | ||
| 83 | - } | ||
| 84 | - /// <summary> | ||
| 85 | - /// Option: send timeout in milliseconds | ||
| 86 | - /// </summary> | ||
| 87 | - /// <remarks> | ||
| 88 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 89 | - /// </remarks> | ||
| 90 | - public int OptionSendTimeout | ||
| 91 | - { | ||
| 92 | - get => Socket.SendTimeout; | ||
| 93 | - set => Socket.SendTimeout = value; | ||
| 94 | - } | ||
| 95 | - /// <summary> | ||
| 96 | - /// Option: linger state | ||
| 97 | - /// </summary> | ||
| 98 | - public LingerOption OptionLingerState | ||
| 99 | - { | ||
| 100 | - get => Socket.LingerState; | ||
| 101 | - set => Socket.LingerState = value; | ||
| 102 | - } | ||
| 66 | + public int OptionSendBufferSize { get; set; } = 8192; | ||
| 103 | 67 | ||
| 104 | 68 | #region Connect/Disconnect session | |
| 105 | 69 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,49 +83,11 @@ public TcpClient(IPEndPoint endpoint) | |||
| 83 | 83 | /// <summary> | |
| 84 | 84 | /// Option: receive buffer size | |
| 85 | 85 | /// </summary> | |
| 86 | - public int OptionReceiveBufferSize | ||
| 87 | - { | ||
| 88 | - get => Socket.ReceiveBufferSize; | ||
| 89 | - set => Socket.ReceiveBufferSize = value; | ||
| 90 | - } | ||
| 86 | + public int OptionReceiveBufferSize { get; set; } = 8192; | ||
| 91 | 87 | /// <summary> | |
| 92 | 88 | /// Option: send buffer size | |
| 93 | 89 | /// </summary> | |
| 94 | - public int OptionSendBufferSize | ||
| 95 | - { | ||
| 96 | - get => Socket.SendBufferSize; | ||
| 97 | - set => Socket.SendBufferSize = value; | ||
| 98 | - } | ||
| 99 | - /// <summary> | ||
| 100 | - /// Option: receive timeout in milliseconds | ||
| 101 | - /// </summary> | ||
| 102 | - /// <remarks> | ||
| 103 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 104 | - /// </remarks> | ||
| 105 | - public int OptionReceiveTimeout | ||
| 106 | - { | ||
| 107 | - get => Socket.ReceiveTimeout; | ||
| 108 | - set => Socket.ReceiveTimeout = value; | ||
| 109 | - } | ||
| 110 | - /// <summary> | ||
| 111 | - /// Option: send timeout in milliseconds | ||
| 112 | - /// </summary> | ||
| 113 | - /// <remarks> | ||
| 114 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 115 | - /// </remarks> | ||
| 116 | - public int OptionSendTimeout | ||
| 117 | - { | ||
| 118 | - get => Socket.SendTimeout; | ||
| 119 | - set => Socket.SendTimeout = value; | ||
| 120 | - } | ||
| 121 | - /// <summary> | ||
| 122 | - /// Option: linger state | ||
| 123 | - /// </summary> | ||
| 124 | - public LingerOption OptionLingerState | ||
| 125 | - { | ||
| 126 | - get => Socket.LingerState; | ||
| 127 | - set => Socket.LingerState = value; | ||
| 128 | - } | ||
| 90 | + public int OptionSendBufferSize { get; set; } = 8192; | ||
| 129 | 91 | ||
| 130 | 92 | #region Connect/Disconnect client | |
| 131 | 93 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,6 +98,14 @@ public TcpServer(IPEndPoint endpoint) | |||
| 98 | 98 | /// This option will enable/disable SO_EXCLUSIVEADDRUSE if the OS support this feature | |
| 99 | 99 | /// </remarks> | |
| 100 | 100 | public bool OptionExclusiveAddressUse { get; set; } | |
| 101 | + /// <summary> | ||
| 102 | + /// Option: receive buffer size | ||
| 103 | + /// </summary> | ||
| 104 | + public int OptionReceiveBufferSize { get; set; } = 8192; | ||
| 105 | + /// <summary> | ||
| 106 | + /// Option: send buffer size | ||
| 107 | + /// </summary> | ||
| 108 | + public int OptionSendBufferSize { get; set; } = 8192; | ||
| 101 | 109 | ||
| 102 | 110 | #region Start/Stop server | |
| 103 | 111 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,8 @@ public TcpSession(TcpServer server) | |||
| 20 | 20 | { | |
| 21 | 21 | Id = Guid.NewGuid(); | |
| 22 | 22 | Server = server; | |
| 23 | + OptionReceiveBufferSize = server.OptionReceiveBufferSize; | ||
| 24 | + OptionSendBufferSize = server.OptionSendBufferSize; | ||
| 23 | 25 | } | |
| 24 | 26 | ||
| 25 | 27 | /// <summary> | |
@@ -56,49 +58,11 @@ public TcpSession(TcpServer server) | |||
| 56 | 58 | /// <summary> | |
| 57 | 59 | /// Option: receive buffer size | |
| 58 | 60 | /// </summary> | |
| 59 | - public int OptionReceiveBufferSize | ||
| 60 | - { | ||
| 61 | - get => Socket.ReceiveBufferSize; | ||
| 62 | - set => Socket.ReceiveBufferSize = value; | ||
| 63 | - } | ||
| 61 | + public int OptionReceiveBufferSize { get; set; } = 8192; | ||
| 64 | 62 | /// <summary> | |
| 65 | 63 | /// Option: send buffer size | |
| 66 | 64 | /// </summary> | |
| 67 | - public int OptionSendBufferSize | ||
| 68 | - { | ||
| 69 | - get => Socket.SendBufferSize; | ||
| 70 | - set => Socket.SendBufferSize = value; | ||
| 71 | - } | ||
| 72 | - /// <summary> | ||
| 73 | - /// Option: receive timeout in milliseconds | ||
| 74 | - /// </summary> | ||
| 75 | - /// <remarks> | ||
| 76 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 77 | - /// </remarks> | ||
| 78 | - public int OptionReceiveTimeout | ||
| 79 | - { | ||
| 80 | - get => Socket.ReceiveTimeout; | ||
| 81 | - set => Socket.ReceiveTimeout = value; | ||
| 82 | - } | ||
| 83 | - /// <summary> | ||
| 84 | - /// Option: send timeout in milliseconds | ||
| 85 | - /// </summary> | ||
| 86 | - /// <remarks> | ||
| 87 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 88 | - /// </remarks> | ||
| 89 | - public int OptionSendTimeout | ||
| 90 | - { | ||
| 91 | - get => Socket.SendTimeout; | ||
| 92 | - set => Socket.SendTimeout = value; | ||
| 93 | - } | ||
| 94 | - /// <summary> | ||
| 95 | - /// Option: linger state | ||
| 96 | - /// </summary> | ||
| 97 | - public LingerOption OptionLingerState | ||
| 98 | - { | ||
| 99 | - get => Socket.LingerState; | ||
| 100 | - set => Socket.LingerState = value; | ||
| 101 | - } | ||
| 65 | + public int OptionSendBufferSize { get; set; } = 8192; | ||
| 102 | 66 | ||
| 103 | 67 | #region Connect/Disconnect session | |
| 104 | 68 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,49 +94,11 @@ public UdpClient(IPEndPoint endpoint) | |||
| 94 | 94 | /// <summary> | |
| 95 | 95 | /// Option: receive buffer size | |
| 96 | 96 | /// </summary> | |
| 97 | - public int OptionReceiveBufferSize | ||
| 98 | - { | ||
| 99 | - get => Socket.ReceiveBufferSize; | ||
| 100 | - set => Socket.ReceiveBufferSize = value; | ||
| 101 | - } | ||
| 97 | + public int OptionReceiveBufferSize { get; set; } = 8192; | ||
| 102 | 98 | /// <summary> | |
| 103 | 99 | /// Option: send buffer size | |
| 104 | 100 | /// </summary> | |
| 105 | - public int OptionSendBufferSize | ||
| 106 | - { | ||
| 107 | - get => Socket.SendBufferSize; | ||
| 108 | - set => Socket.SendBufferSize = value; | ||
| 109 | - } | ||
| 110 | - /// <summary> | ||
| 111 | - /// Option: receive timeout in milliseconds | ||
| 112 | - /// </summary> | ||
| 113 | - /// <remarks> | ||
| 114 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 115 | - /// </remarks> | ||
| 116 | - public int OptionReceiveTimeout | ||
| 117 | - { | ||
| 118 | - get => Socket.ReceiveTimeout; | ||
| 119 | - set => Socket.ReceiveTimeout = value; | ||
| 120 | - } | ||
| 121 | - /// <summary> | ||
| 122 | - /// Option: send timeout in milliseconds | ||
| 123 | - /// </summary> | ||
| 124 | - /// <remarks> | ||
| 125 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 126 | - /// </remarks> | ||
| 127 | - public int OptionSendTimeout | ||
| 128 | - { | ||
| 129 | - get => Socket.SendTimeout; | ||
| 130 | - set => Socket.SendTimeout = value; | ||
| 131 | - } | ||
| 132 | - /// <summary> | ||
| 133 | - /// Option: linger state | ||
| 134 | - /// </summary> | ||
| 135 | - public LingerOption OptionLingerState | ||
| 136 | - { | ||
| 137 | - get => Socket.LingerState; | ||
| 138 | - set => Socket.LingerState = value; | ||
| 139 | - } | ||
| 101 | + public int OptionSendBufferSize { get; set; } = 8192; | ||
| 140 | 102 | ||
| 141 | 103 | #region Connect/Disconnect client | |
| 142 | 104 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -95,49 +95,11 @@ public UdpServer(IPEndPoint endpoint) | |||
| 95 | 95 | /// <summary> | |
| 96 | 96 | /// Option: receive buffer size | |
| 97 | 97 | /// </summary> | |
| 98 | - public int OptionReceiveBufferSize | ||
| 99 | - { | ||
| 100 | - get => Socket.ReceiveBufferSize; | ||
| 101 | - set => Socket.ReceiveBufferSize = value; | ||
| 102 | - } | ||
| 98 | + public int OptionReceiveBufferSize { get; set; } = 8192; | ||
| 103 | 99 | /// <summary> | |
| 104 | 100 | /// Option: send buffer size | |
| 105 | 101 | /// </summary> | |
| 106 | - public int OptionSendBufferSize | ||
| 107 | - { | ||
| 108 | - get => Socket.SendBufferSize; | ||
| 109 | - set => Socket.SendBufferSize = value; | ||
| 110 | - } | ||
| 111 | - /// <summary> | ||
| 112 | - /// Option: receive timeout in milliseconds | ||
| 113 | - /// </summary> | ||
| 114 | - /// <remarks> | ||
| 115 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 116 | - /// </remarks> | ||
| 117 | - public int OptionReceiveTimeout | ||
| 118 | - { | ||
| 119 | - get => Socket.ReceiveTimeout; | ||
| 120 | - set => Socket.ReceiveTimeout = value; | ||
| 121 | - } | ||
| 122 | - /// <summary> | ||
| 123 | - /// Option: send timeout in milliseconds | ||
| 124 | - /// </summary> | ||
| 125 | - /// <remarks> | ||
| 126 | - /// The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period. | ||
| 127 | - /// </remarks> | ||
| 128 | - public int OptionSendTimeout | ||
| 129 | - { | ||
| 130 | - get => Socket.SendTimeout; | ||
| 131 | - set => Socket.SendTimeout = value; | ||
| 132 | - } | ||
| 133 | - /// <summary> | ||
| 134 | - /// Option: linger state | ||
| 135 | - /// </summary> | ||
| 136 | - public LingerOption OptionLingerState | ||
| 137 | - { | ||
| 138 | - get => Socket.LingerState; | ||
| 139 | - set => Socket.LingerState = value; | ||
| 140 | - } | ||
| 102 | + public int OptionSendBufferSize { get; set; } = 8192; | ||
| 141 | 103 | ||
| 142 | 104 | #region Connect/Disconnect client | |
| 143 | 105 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments