Skip to content

Commit e86ba3c

Browse files
Merge pull request #2
Update 0.3
2 parents 55ee281 + 1de8ad7 commit e86ba3c

File tree

12 files changed

+74
-98
lines changed

12 files changed

+74
-98
lines changed

.github/workflows/dotnet-test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
name: Tests
3+
4+
on:
5+
push:
6+
branches: [ "master", "release" ]
7+
pull_request:
8+
branches: [ "master", "release" ]
9+
10+
jobs:
11+
build-and-test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-dotnet@v4
16+
with:
17+
dotnet-version: '9.0.x'
18+
- run: cp global.json.dist global.json
19+
- name: Install dependencies
20+
run: dotnet restore
21+
- name: Build
22+
run: dotnet build --no-restore
23+
- name: Test with the dotnet CLI
24+
run: dotnet test --no-build

.gitignore

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*.usertasks
1111
*.resources
1212
*.vs10x
13-
*_ReSharper.*
1413
.vs
14+
.vscode
1515

1616

1717
###### Binary files
@@ -22,23 +22,8 @@
2222
*.nupkg
2323

2424

25-
###### DNX
26-
#project.lock.json
27-
artifacts
28-
29-
30-
###### Custom NAnt configuration
31-
/build.conf
32-
33-
34-
###### Automatic generated documentation and report files
35-
doc/generated/*
36-
doc/reports/*
37-
38-
39-
###### Other files
40-
dep/src/*
41-
src/packages/*
25+
###### Local files
26+
global.json
4227
NLibuv.snk
4328

4429

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

NLibuv.sln.DotSettings

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
NLibuv [![Build Status](https://travis-ci.org/neris/NLibuv.svg?branch=master)](https://travis-ci.org/neris/NLibuv) [![Build Status](https://ci.appveyor.com/api/projects/status/4vcw8d72fvtgwuhf?svg=true)](https://ci.appveyor.com/project/neris/nlibuv) [![NuGet](https://img.shields.io/nuget/v/NLibuv.svg?label=nuget:%20NLibuv)](https://www.nuget.org/packages/NLibuv/) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/neris/NLibuv/master/LICENSE)
1+
NLibuv [![Build status](https://github.com/VitaliiTsilnyk/NLibuv/actions/workflows/dotnet-test.yml/badge.svg?branch=master)](https://github.com/VitaliiTsilnyk/NLibuv/actions) [![NuGet](https://img.shields.io/nuget/v/NLibuv.svg?label=nuget:%20NLibuv)](https://www.nuget.org/packages/NLibuv/) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/VitaliiTsilnyk/NLibuv/master/LICENSE)
22
========
33

44
A cross-platform bindings to the [libuv library](http://libuv.org/) for .NET.
55

6-
The purpose of this library is to provide the libuv API on .NET platform, as simple as possible.
6+
The purpose of this library is to provide the libuv API on .NET platform, as simple as possible.
77
It requires you to write your code as if you were using libuv directly.
8-
NLibuv takes care of platform invoke, marshaling, error handling and memory management,
8+
NLibuv takes care of platform invoke, marshaling, error handling and memory management,
99
allowing you to consume libuv API as it is, safely on any platform supported by .NET.
1010

1111
### Thread safety
1212

13-
This library is **NOT** thread safe. Like the original libuv library, it has only
13+
This library is **NOT** thread safe. Like the original libuv library, it has only
1414
one thread safe method: `UvAsync.Send` (which represents libuv's `uv_async_send` function).
15-
If you're using NLibuv in multithreaded environment, you have to take care of synchronization by yourself,
15+
If you're using NLibuv in multithreaded environment, you have to take care of synchronization by yourself,
1616
NLibuv will help you with this only by throwing an exception if you try to call non-thread-safe method from incorrect thread.
1717

1818

1919
### Warning! Work in progress!
2020

2121
This project currently is in the development stage. Use at your own risk.
2222

23-
Not all libuv API methods are implemented yet, and many of them will not be implemented in this
23+
Not all libuv API methods are implemented yet, and many of them will not be implemented in this
2424
package at all since .NET platform provides similar functionality (for example, Threading and synchronization utilities, Process handles, etc).
2525

26-
Please refer to the [project's GitHub issues page](https://github.com/neris/NLibuv/issues) for more information about the development progress.
26+
Please refer to the [project's GitHub issues page](https://github.com/VitaliiTsilnyk/NLibuv/issues) for more information about the development progress.
2727

2828

2929

appveyor.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

global.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

global.json.dist

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "9.0.202",
4+
"rollForward": "latestMinor",
5+
"allowPrerelease": true
6+
}
7+
}

src/NLibuv/NLibuv.csproj

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33
<PropertyGroup>
44
<Description>A cross-platform bindings to the libuv library for .NET.</Description>
55
<AssemblyTitle>NLibuv</AssemblyTitle>
6-
<VersionPrefix>0.2.1</VersionPrefix>
6+
<VersionPrefix>0.3.0</VersionPrefix>
77
<Authors>Vitaly Zilnik</Authors>
88
<TargetFramework>netstandard2.0</TargetFramework>
99
<NoWarn>$(NoWarn);CS1591</NoWarn>
1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1111
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
12-
<LangVersion>6</LangVersion>
12+
<LangVersion>13</LangVersion>
1313
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1414
<AssemblyName>NLibuv</AssemblyName>
1515
<PackageId>NLibuv</PackageId>
1616
<PackageTags>libuv;uv;io;async</PackageTags>
17-
<PackageProjectUrl>http://github.com/neris/NLibuv</PackageProjectUrl>
18-
<PackageLicenseUrl>https://raw.githubusercontent.com/neris/NLibuv/master/LICENSE</PackageLicenseUrl>
17+
<PackageProjectUrl>http://github.com/VitaliiTsilnyk/NLibuv</PackageProjectUrl>
18+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
19+
<PackageReadmeFile>README.md</PackageReadmeFile>
1920
<RepositoryType>git</RepositoryType>
20-
<RepositoryUrl>git://github.com/neris/NLibuv</RepositoryUrl>
21+
<RepositoryUrl>git://github.com/VitaliiTsilnyk/NLibuv</RepositoryUrl>
2122
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
2223
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
2324
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
@@ -26,12 +27,12 @@
2627
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
2728
</PropertyGroup>
2829

29-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' OR '$(TargetFramework)' == 'netstandard2.0' ">
30-
<DefineConstants>$(DefineConstants);DOTNET_CORE</DefineConstants>
31-
</PropertyGroup>
32-
3330
<ItemGroup>
3431
<PackageReference Include="Libuv" Version="1.10.0" />
3532
</ItemGroup>
3633

34+
<ItemGroup>
35+
<None Include="../../README.md" Pack="true" PackagePath="/"/>
36+
</ItemGroup>
37+
3738
</Project>

src/NLibuv/Native/Libuv.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ private static UvErrorCode _GetErrorCode(string errorName)
225225
[DllImport(LibuvName, CallingConvention = CallingConvention.Cdecl)]
226226
public static extern int uv_tcp_nodelay(UvTcp handle, int enable);
227227

228+
[DllImport(LibuvName, CallingConvention = CallingConvention.Cdecl)]
229+
public static extern int uv_tcp_keepalive(UvTcp handle, int enable, uint delay);
230+
228231
[DllImport(LibuvName, CallingConvention = CallingConvention.Cdecl)]
229232
public static extern int uv_tcp_connect(UvTcpConnectRequest req, UvTcp handle, ref SockAddr addr, UvConnectCallback cb);
230233

0 commit comments

Comments
 (0)