Commit Graph

176 Commits

Author SHA1 Message Date
LemonBoy
81e5a35d56 Show correct address for ipv6 sockets, fixes #7634 (#10505) 2019-01-31 07:34:26 +01:00
Andreas Rumpf
ca672ec62e appveyor: make the build green again 2018-12-22 09:47:22 +01:00
Araq
4a6d699bc5 C++: make async tests green on Windows 2018-12-21 22:03:41 +01:00
Araq
3f6168b337 removes deprecated T/P types 2018-11-16 13:27:56 +01:00
loongw
4841fc5356 \#include "windows.h" instead of "Windows.h" (#9475)
This fixes #9474
2018-10-23 15:50:11 +02:00
LemonBoy
a27429304e Convert *_family fields to cushort
Fixes #9008
2018-09-19 12:33:11 +02:00
andri lim
c3d5ec8ead fixes #8421, fixes #7968, Nim compiler compiles with MSVC C89 version (#8556) 2018-08-07 09:07:18 +02:00
Dmitry Atamanov
bf5d619a52 Add MemMapFileStream. Fixes in memFiles. (#7944)
* Add MemMapFileStream

* Added tests

* Fixed bug in memfiles (zero index for string)

* Added flush to changelog

* Attempt to fix Win's nuances

* Fix attempt to fix

* Continue...

* And again...

* Reworked tests (all for win on Win)

* Fixes in flush (Win)

* Replace fn vars to consts

* Added the attempts parameter to the flush

* Replace while to for

* Move to memfiles

* Use Natural instead of uint

* Better error messages for append mode. Handle specific cases.
2018-06-14 17:34:26 +01:00
Jacek Sieka
72dfe176f5 remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
Hendrik
b1b517128e os.setLastModificationTime*(file: string, t: times.Time) (#7543)
* add proc toFILETIME to winlean
* add proc toWinTime to times
* add proc setFileTime to winlean
* openHandle with write access
* add proc setLastModificationTime to os
* moved epochDiff,rateDiff constants and proc toWinTime
The constants were moved out of the when defined(JS) block so that they
are alsways available in proc toWinTime.
proc toWinTime was moved above the # Deprecated procs comment. Best new
location seemed to be with the toUnix proc.
2018-04-16 22:03:24 +02:00
Eugene Kabanov
0b99e8e8cb Fix compiler stuck on waiting C/CPP backends. (#7472) 2018-04-02 21:54:27 +02:00
Yuriy Glukhov
0770844285 Comments addressed 2018-03-24 22:55:06 +02:00
Yuriy Glukhov
1bd0efb067 Fixed crash/interface. Added tests. 2018-03-15 15:49:41 +02:00
Ruslan Mustakov
319e88585a Fix AsyncFile open flags. Fixes #5531 2018-02-17 17:40:35 +07:00
oskca
495331bf20 raiseOSError to indicate the failling of findNextFile in walkDir[Rec] 2018-01-11 13:40:35 +08:00
cheatfate
59d4530562 Remove -3 as marker of exited process.
Cache exiting process for Windows to omit unnecessary syscalls.
Fix closing hThread for Windows.
Fix for pause/resume on Windows.
Fix process handle leak on Windows.
Change behavior for waitForExit on Windows.
2017-12-11 21:12:07 +02:00
Federico Ceratto
83de3a85e7 Add TCP_NODELAY support #6795 2017-11-24 23:01:18 +00:00
Charlie Barto
d55e02ddf1 fixes to allow the usage of clang on windows with the msvc abi and ms headers (#6442) 2017-10-09 17:26:53 +02:00
Yuriy Glukhov
0345238d6e Added moveDir (#6015) 2017-06-27 10:09:41 +02:00
Ruslan Mustakov
ecf278c467 Implement dial, support IPv6 in httpclient (#5763)
* Implement dial, support IPv6 in httpclient

Added ``dial`` procedure to networking modules: ``net``, ``asyncdispatch``,
``asyncnet``. It merges socket creation, address resolution, and connection
into single step. When using ``dial``, you don't have to worry about
IPv4 vs IPv6 problem.

Fixed addrInfo loop in connect to behave properly.
Previously it would stop on first non-immediate failure, instead of
continuing and trying the remaining addresses.

Fixed newAsyncNativeSocket to raise proper error if socket creation
fails.

Fixes: #3811

* Check domain during connect() only on non-Windows

This is how it was in the previous implementation of connect().

* Call 'osLastError' before 'close' in net.dial

* Record osLastError before freeAddrInfo in net.dial

* Add missing docs for 'dial' proc

* Optimize dial to create one FD per domain, add tests

And make async IPv6 servers work on Windows.

* Add IPv6 test to uri module

* Fix getAddrString error handling
2017-05-02 09:25:50 +02:00
Anatoly Galiulin
434a7c8426 Fix posix version of moveFile between different filesystems (#5580) 2017-03-23 23:40:03 +01:00
Federico Ceratto
dd4d47c671 Add gethostname to nativesockets (#5443) 2017-03-01 09:44:24 +01:00
Rokas Kupstys
a3b8bf300d Added fiber API to winlean.nim 2017-02-20 17:24:19 +02:00
Ruslan Mustakov
fb8168d338 Fix Windows accept() to fail future instead of raising
Resolves: #5279
2017-02-01 18:18:44 +07:00
Eugene Kabanov
e17969c03f Fix declaration of inet_ntop to be GCSafe. (#5266) 2017-01-23 16:58:00 +01:00
Loris Pederiva
f237f7f1cf Make SockAddr.sa_data public
Make SockAddr.sa_data public, coherently with its Posix counterpart.
2017-01-11 12:01:27 +01:00
Araq
5182be6204 winlean: get rid of deprecation warning 2017-01-03 17:06:31 +01:00
Araq
08913db924 added registry.nim to the stdlib 2016-10-09 02:01:28 +02:00
Araq
6e6b90278c koch supports the finish command for smooth installations on Windows 2016-10-09 01:59:50 +02:00
Araq
6a1b8e691f fixes #4764, fixes #4731, fixes #4724 2016-09-14 19:59:32 +02:00
Andreas Rumpf
0834cd63d9 prepare Nim codebase for upcoming parser changes 2016-07-15 12:56:03 +02:00
miere43
8314412b99 Added stdcall pragma to WINAPI methods. 2016-06-26 22:18:14 +03:00
miere43
57bd50a916 Removed INPUT_KEY_RECORD 2016-06-26 16:01:37 +03:00
miere43
dd7a24d8cc Implemented terminal.getch() for Windows 2016-06-23 23:22:38 +03:00
cheatfate
b53f13cbe7 New version, without any piece of code duplication. 2016-06-17 13:37:42 +03:00
cheatfate
43329c5909 Introduce addRead/addWrite for Windows IOCP. 2016-06-12 15:09:30 +03:00
Andreas Rumpf
6556ec2ce0 fixes Windows builds 2016-05-30 10:52:47 +02:00
Stephane Fontaine
f12fc1140d Remove spurious semicolon in type definition 2016-05-19 19:58:17 +04:00
cheatfate
6fa6fdeb34 Resolve bugs based on unreliable bytesReceived value. 2016-05-12 21:11:42 +03:00
cheatfate
2a2a3d6c39 CompletionKey parameter for functions CreateIoCompletionPort,
GetQueuedCompletionStatus must be 64bit size on amd64 and 32bit size on x86.
2016-04-19 03:04:44 +03:00
cheatfate
5d96faf78c Correct getOverlappedResult() definition 2016-04-13 11:02:46 +03:00
Araq
db2b215658 resolved merge conflicts 2016-03-29 15:31:10 +02:00
Josep Sanjuas
5a582a0d9c Define ports as uint16s to fix #3484 2016-03-27 22:56:44 +02:00
Araq
8bf14b12a9 proper indentation 2016-03-18 18:56:01 +01:00
Araq
aa47302866 get rid of compiler warning 2016-03-18 18:53:17 +01:00
gmpreussner
9920de0147 Renamed local variable to avoid compiler warning. 2016-03-16 11:34:09 -04:00
cheatfate
901b7bdaf2 Resolve "redifintion" errors, when using Microsoft Compiler and Visual Studio headers described in Issue #3879 2016-02-18 18:17:01 +02:00
def
867285c5a9 Rename THANDLE to Handle to fix deprecation warnings 2016-02-11 22:45:03 +01:00
Anatoly Galiulin
477e3b0e20 Fixed issue 3539, added test 2016-01-28 16:56:06 +06:00
Araq
c977daf9d8 added poDemon flag for process management 2015-10-19 16:09:34 +02:00