win32-pipe 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -2
- data/CHANGES +88 -83
- data/MANIFEST +19 -19
- data/README +58 -58
- data/Rakefile +70 -70
- data/certs/djberg96_pub.pem +21 -21
- data/examples/example_client.rb +29 -29
- data/examples/example_client_async.rb +82 -82
- data/examples/example_server.rb +32 -32
- data/examples/example_server_async.rb +100 -100
- data/lib/win32/pipe.rb +250 -251
- data/lib/win32/pipe/client.rb +65 -65
- data/lib/win32/pipe/server.rb +96 -96
- data/lib/win32/pipe/windows/constants.rb +46 -46
- data/lib/win32/pipe/windows/functions.rb +37 -37
- data/test/test_win32_pipe.rb +162 -162
- data/test/test_win32_pipe_client.rb +62 -62
- data/test/test_win32_pipe_server.rb +34 -34
- data/win32-pipe.gemspec +26 -26
- metadata +16 -9
- metadata.gz.sig +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1572a543a4cf5a0fead04fcb17d1ebd6343b8e5
|
4
|
+
data.tar.gz: d98b3919225b3822fbc52e65e6a8dc4f1ab2f00b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16d34e937672af8fd001d043a6bf7ae67dc5c8cb04f2a0837f063ccadef027c815078673a2dfe3177cb55cc42fce1449c37ced301857416e5c0340bcc9b11bfe
|
7
|
+
data.tar.gz: e8d62266689176b0f1628c8bff6c703109b66186f8048bcaefe9991595b83b0385b67dd5fa864a2cbc923accec89ba6401240f787c3e2b13a2713f10d25dc5b4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�LQ�;��پ~i�Xf������w��T=���w
|
2
|
+
���{���XMF�9��e��[��?a;���ml*y� �2�!��Ah� �;u���^,���R�y/D4��o�R�a#>푑],l�J�?�9kU�� ��3��W!����9��z���7=��Wy���*W
|
data/CHANGES
CHANGED
@@ -1,83 +1,88 @@
|
|
1
|
-
== 0.3.
|
2
|
-
*
|
3
|
-
|
4
|
-
*
|
5
|
-
|
6
|
-
== 0.3.
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
|
11
|
-
== 0.3.
|
12
|
-
*
|
13
|
-
|
14
|
-
*
|
15
|
-
|
16
|
-
|
17
|
-
*
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
*
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
*
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
*
|
36
|
-
|
37
|
-
|
38
|
-
== 0.
|
39
|
-
*
|
40
|
-
*
|
41
|
-
*
|
42
|
-
|
43
|
-
== 0.2.
|
44
|
-
*
|
45
|
-
*
|
46
|
-
*
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
*
|
52
|
-
*
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
*
|
57
|
-
*
|
58
|
-
|
59
|
-
*
|
60
|
-
|
61
|
-
*
|
62
|
-
*
|
63
|
-
*
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
*
|
68
|
-
*
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
* Moved the
|
73
|
-
*
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
*
|
79
|
-
*
|
80
|
-
|
81
|
-
|
82
|
-
== 0.0
|
83
|
-
*
|
1
|
+
== 0.3.7 - 24-Nov-2015
|
2
|
+
* Fixed two function prototypes where I mistakenly specified :bool instead
|
3
|
+
of :int, and updated the underlying code to match.
|
4
|
+
* Fixed the asynchronous write method.
|
5
|
+
|
6
|
+
== 0.3.6 - 15-Sep-2015
|
7
|
+
* This gem is now signed.
|
8
|
+
* Added a win32-pipe.rb file for your convenience.
|
9
|
+
* The Rakefile now assumes Rubygems 2.x.
|
10
|
+
|
11
|
+
== 0.3.5 - 19-Jun-2014
|
12
|
+
* Added some missing constants that affected the async server.
|
13
|
+
* Removed rubyforge_project from gemspec.
|
14
|
+
* Added Rake as a development dependency.
|
15
|
+
|
16
|
+
== 0.3.4 - 22-Mar-2014
|
17
|
+
* Modified the constructor to allow a fourth argument that lets you set the
|
18
|
+
buffer size used by pipes. The default size has been increased to 4k.
|
19
|
+
* Use a bonafide FFI::Buffer, and re-use it instead of creating a new buffer
|
20
|
+
for each read/write operation.
|
21
|
+
* Thanks go to lionelperrin for the above updates.
|
22
|
+
* Added Rake as a development dependency.
|
23
|
+
|
24
|
+
== 0.3.3 - 21-Oct-2013
|
25
|
+
* Fixed INVALID_HANDLE_VALUE for 64-bit Ruby.
|
26
|
+
* Now internally uses a struct for OVERLAPPED event instead of packed string.
|
27
|
+
|
28
|
+
== 0.3.2 - 27-Jul-2013
|
29
|
+
* Don't raise an error if GetLastError returns ERROR_SUCCESS in server. Thanks
|
30
|
+
to go Ben Jansen for the patch.
|
31
|
+
* Fixed error checking bug in client.
|
32
|
+
* Updates to the Rakefile for Rubygems 2.x.
|
33
|
+
|
34
|
+
== 0.3.1 - 8-Apr-2013
|
35
|
+
* Fixed the HANDLE protype declarations in the underlying FFI code. This
|
36
|
+
addresses a bug in 64 bit versions of Ruby.
|
37
|
+
|
38
|
+
== 0.3.0 - 8-Sep-2012
|
39
|
+
* Converted to FFI. Now works with JRuby, too.
|
40
|
+
* Native errors are now raised as SystemCallErrors.
|
41
|
+
* Test updates, gemspec dependency updates, etc.
|
42
|
+
|
43
|
+
== 0.2.2 - 19-Mar-2012
|
44
|
+
* Added test-unit 2.x as a development dependency.
|
45
|
+
* Refactored some tests to use features of test-unit 2.x.
|
46
|
+
* Refactored the Rakefile.
|
47
|
+
|
48
|
+
== 0.2.1 - 9-Aug-2009
|
49
|
+
* License changed to Artistic 2.0.
|
50
|
+
* Test and example files renamed.
|
51
|
+
* Gemspec updates, including license and description.
|
52
|
+
* Updates to the Rakefile, including the removal of old C rake tasks, as
|
53
|
+
well as the addition of tasks to run the example programs.
|
54
|
+
|
55
|
+
== 0.2.0 - 28-May-2008
|
56
|
+
* Now pure Ruby.
|
57
|
+
* Major interface change. Pipe::Server.new and Pipe::Client.new replace the
|
58
|
+
Pipe.new_server and Pipe.new_client methods, respectively.
|
59
|
+
* An optional 3rd argument, the open mode, is now accepted which allows finer
|
60
|
+
control over how pipes are created.
|
61
|
+
* Several pipe mode and open mode constants were added.
|
62
|
+
* The asynchronous pipe server actually works now.
|
63
|
+
* Added the Pipe#name method.
|
64
|
+
* Added the Pipe#asynchronous? method.
|
65
|
+
* Added the Pipe#size method as an alias for Pipe#length.
|
66
|
+
* Added a Rakefile with tasks for testing and installation.
|
67
|
+
* Added a gemspec and uploaded a gem file to RubyForge.
|
68
|
+
* Merged the doc files into the README and/or replaced them with inlined
|
69
|
+
comments that are RDoc friendly.
|
70
|
+
|
71
|
+
== 0.1.2 - 1-Mar-2005
|
72
|
+
* Moved the 'examples' directory to the toplevel directory.
|
73
|
+
* Made the CHANGES and README files rdoc friendly.
|
74
|
+
|
75
|
+
== 0.1.1 - 25-Aug-2004
|
76
|
+
* Added many more tests to the test suite.
|
77
|
+
* Moved the example programs to doc/examples.
|
78
|
+
* Fixed minor bugs in the asynchronous client and server test programs.
|
79
|
+
* Removed the pipe.html file. You can generate your own html documentation
|
80
|
+
using rd2 on the pipe.rd file.
|
81
|
+
|
82
|
+
== 0.1.0 - 13-Feb-2004
|
83
|
+
* Asynchronous support added (thanks Park Heesob)
|
84
|
+
* Sample test programs added. See files under 'test'.
|
85
|
+
* Documentation updates.
|
86
|
+
|
87
|
+
== 0.0.1 - 20-Nov-2003
|
88
|
+
* Initial release
|
data/MANIFEST
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
* MANIFEST
|
2
|
-
* README
|
3
|
-
* CHANGES
|
4
|
-
* Rakefile
|
5
|
-
* win32-pipe.gemspec
|
6
|
-
* certs/djberg96_pub.pem
|
7
|
-
* examples/example_server.rb
|
8
|
-
* examples/example_server_async.rb
|
9
|
-
* examples/example_client.rb
|
10
|
-
* examples/example_client_async.rb
|
11
|
-
* lib/win32-pipe.rb
|
12
|
-
* lib/win32/pipe.rb
|
13
|
-
* lib/win32/pipe/client.rb
|
14
|
-
* lib/win32/pipe/server.rb
|
15
|
-
* lib/win32/pipe/windows/constants.rb
|
16
|
-
* lib/win32/pipe/windows/functions.rb
|
17
|
-
* test/test_win32_pipe.rb
|
18
|
-
* test/test_win32_pipe_client.rb
|
19
|
-
* test/test_win32_pipe_server.rb
|
1
|
+
* MANIFEST
|
2
|
+
* README
|
3
|
+
* CHANGES
|
4
|
+
* Rakefile
|
5
|
+
* win32-pipe.gemspec
|
6
|
+
* certs/djberg96_pub.pem
|
7
|
+
* examples/example_server.rb
|
8
|
+
* examples/example_server_async.rb
|
9
|
+
* examples/example_client.rb
|
10
|
+
* examples/example_client_async.rb
|
11
|
+
* lib/win32-pipe.rb
|
12
|
+
* lib/win32/pipe.rb
|
13
|
+
* lib/win32/pipe/client.rb
|
14
|
+
* lib/win32/pipe/server.rb
|
15
|
+
* lib/win32/pipe/windows/constants.rb
|
16
|
+
* lib/win32/pipe/windows/functions.rb
|
17
|
+
* test/test_win32_pipe.rb
|
18
|
+
* test/test_win32_pipe_client.rb
|
19
|
+
* test/test_win32_pipe_server.rb
|
data/README
CHANGED
@@ -1,58 +1,58 @@
|
|
1
|
-
== Description
|
2
|
-
A Ruby interface for named pipes on Windows.
|
3
|
-
|
4
|
-
== Prerequisites
|
5
|
-
ffi
|
6
|
-
|
7
|
-
== Installation
|
8
|
-
gem install win32-pipe
|
9
|
-
|
10
|
-
== Synopsis
|
11
|
-
require 'win32/pipe'
|
12
|
-
include Win32
|
13
|
-
|
14
|
-
# In server.rb
|
15
|
-
pipe_server = Pipe::Server.new("foo_pipe")
|
16
|
-
pipe_server.connect
|
17
|
-
data = pipe_server.read
|
18
|
-
puts "Got #{data} from client"
|
19
|
-
pipe_server.close
|
20
|
-
|
21
|
-
# In client.rb (run from a different shell)
|
22
|
-
pipe_client = Pipe::Client.new("foo_pipe")
|
23
|
-
pipe_client.write("Hello World")
|
24
|
-
pipe_client.close
|
25
|
-
|
26
|
-
== What's a named pipe?
|
27
|
-
A pipe with a name - literally. In practice, it will feel more like a cross
|
28
|
-
between a socket and a pipe. At least, it does to me.
|
29
|
-
|
30
|
-
== What good is it?
|
31
|
-
My hope is that it can be used in certain circumstances where a fork might
|
32
|
-
be desirable, but which is not possible on Windows. It could also be handy
|
33
|
-
for the traditional "piping data to a server" usage. And if you come up
|
34
|
-
with anything cool, please let us all know!
|
35
|
-
|
36
|
-
== Contributions
|
37
|
-
Although this library is free, please consider having your company
|
38
|
-
setup a gittip if used by your company professionally.
|
39
|
-
|
40
|
-
http://www.gittip.com/djberg96/
|
41
|
-
|
42
|
-
== Future Plans
|
43
|
-
Add transactions
|
44
|
-
|
45
|
-
== License
|
46
|
-
Artistic 2.0
|
47
|
-
|
48
|
-
== Warranty
|
49
|
-
This package is provided "as is" and without any express or
|
50
|
-
implied warranties, including, without limitation, the implied
|
51
|
-
warranties of merchantability and fitness for a particular purpose.
|
52
|
-
|
53
|
-
== Copyright
|
54
|
-
(C) 2003-2014, Daniel J. Berger, All Rights Reserved.
|
55
|
-
|
56
|
-
== Authors
|
57
|
-
Daniel Berger
|
58
|
-
Park Heesob
|
1
|
+
== Description
|
2
|
+
A Ruby interface for named pipes on Windows.
|
3
|
+
|
4
|
+
== Prerequisites
|
5
|
+
ffi
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
gem install win32-pipe
|
9
|
+
|
10
|
+
== Synopsis
|
11
|
+
require 'win32/pipe'
|
12
|
+
include Win32
|
13
|
+
|
14
|
+
# In server.rb
|
15
|
+
pipe_server = Pipe::Server.new("foo_pipe")
|
16
|
+
pipe_server.connect
|
17
|
+
data = pipe_server.read
|
18
|
+
puts "Got #{data} from client"
|
19
|
+
pipe_server.close
|
20
|
+
|
21
|
+
# In client.rb (run from a different shell)
|
22
|
+
pipe_client = Pipe::Client.new("foo_pipe")
|
23
|
+
pipe_client.write("Hello World")
|
24
|
+
pipe_client.close
|
25
|
+
|
26
|
+
== What's a named pipe?
|
27
|
+
A pipe with a name - literally. In practice, it will feel more like a cross
|
28
|
+
between a socket and a pipe. At least, it does to me.
|
29
|
+
|
30
|
+
== What good is it?
|
31
|
+
My hope is that it can be used in certain circumstances where a fork might
|
32
|
+
be desirable, but which is not possible on Windows. It could also be handy
|
33
|
+
for the traditional "piping data to a server" usage. And if you come up
|
34
|
+
with anything cool, please let us all know!
|
35
|
+
|
36
|
+
== Contributions
|
37
|
+
Although this library is free, please consider having your company
|
38
|
+
setup a gittip if used by your company professionally.
|
39
|
+
|
40
|
+
http://www.gittip.com/djberg96/
|
41
|
+
|
42
|
+
== Future Plans
|
43
|
+
Add transactions
|
44
|
+
|
45
|
+
== License
|
46
|
+
Artistic 2.0
|
47
|
+
|
48
|
+
== Warranty
|
49
|
+
This package is provided "as is" and without any express or
|
50
|
+
implied warranties, including, without limitation, the implied
|
51
|
+
warranties of merchantability and fitness for a particular purpose.
|
52
|
+
|
53
|
+
== Copyright
|
54
|
+
(C) 2003-2014, Daniel J. Berger, All Rights Reserved.
|
55
|
+
|
56
|
+
== Authors
|
57
|
+
Daniel Berger
|
58
|
+
Park Heesob
|
data/Rakefile
CHANGED
@@ -1,70 +1,70 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rake/clean'
|
3
|
-
require 'rake/testtask'
|
4
|
-
|
5
|
-
CLEAN.include("**/*.gem")
|
6
|
-
|
7
|
-
namespace :gem do
|
8
|
-
desc 'Create the win32-pipe gem'
|
9
|
-
task :create => [:clean] do
|
10
|
-
require 'rubygems/package'
|
11
|
-
spec = eval(IO.read('win32-pipe.gemspec'))
|
12
|
-
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
|
13
|
-
Gem::Package.build(spec)
|
14
|
-
end
|
15
|
-
|
16
|
-
desc 'Install the win32-pipe gem'
|
17
|
-
task :install => [:create] do
|
18
|
-
file = Dir['*.gem'].first
|
19
|
-
sh "gem install -l #{file}"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
namespace :example do
|
24
|
-
desc 'Run the asynchronous client example program'
|
25
|
-
task :async_client do
|
26
|
-
ruby '-Ilib examples/example_client_async.rb'
|
27
|
-
end
|
28
|
-
|
29
|
-
desc 'Run the client example program'
|
30
|
-
task :client do
|
31
|
-
ruby '-Ilib examples/example_client.rb'
|
32
|
-
end
|
33
|
-
|
34
|
-
desc 'Run the asynchronous server example program'
|
35
|
-
task :async_server do
|
36
|
-
ruby '-Ilib examples/example_server_async.rb'
|
37
|
-
end
|
38
|
-
|
39
|
-
desc 'Run the server example program'
|
40
|
-
task :server do
|
41
|
-
ruby '-Ilib examples/example_server.rb'
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
namespace :test do
|
46
|
-
Rake::TestTask.new(:base) do |test|
|
47
|
-
test.warning = true
|
48
|
-
test.verbose = true
|
49
|
-
test.test_files = FileList['test\test_win32_pipe.rb']
|
50
|
-
end
|
51
|
-
|
52
|
-
Rake::TestTask.new(:client) do |test|
|
53
|
-
test.warning = true
|
54
|
-
test.verbose = true
|
55
|
-
test.test_files = FileList['test\test_win32_pipe_client.rb']
|
56
|
-
end
|
57
|
-
|
58
|
-
Rake::TestTask.new(:server) do |test|
|
59
|
-
test.warning = true
|
60
|
-
test.verbose = true
|
61
|
-
test.test_files = FileList['test\test_win32_pipe_server.rb']
|
62
|
-
end
|
63
|
-
|
64
|
-
Rake::TestTask.new(:all) do |test|
|
65
|
-
test.warning = true
|
66
|
-
test.verbose = true
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
task :default => 'test:all'
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/clean'
|
3
|
+
require 'rake/testtask'
|
4
|
+
|
5
|
+
CLEAN.include("**/*.gem")
|
6
|
+
|
7
|
+
namespace :gem do
|
8
|
+
desc 'Create the win32-pipe gem'
|
9
|
+
task :create => [:clean] do
|
10
|
+
require 'rubygems/package'
|
11
|
+
spec = eval(IO.read('win32-pipe.gemspec'))
|
12
|
+
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
|
13
|
+
Gem::Package.build(spec, true)
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Install the win32-pipe gem'
|
17
|
+
task :install => [:create] do
|
18
|
+
file = Dir['*.gem'].first
|
19
|
+
sh "gem install -l #{file}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
namespace :example do
|
24
|
+
desc 'Run the asynchronous client example program'
|
25
|
+
task :async_client do
|
26
|
+
ruby '-Ilib examples/example_client_async.rb'
|
27
|
+
end
|
28
|
+
|
29
|
+
desc 'Run the client example program'
|
30
|
+
task :client do
|
31
|
+
ruby '-Ilib examples/example_client.rb'
|
32
|
+
end
|
33
|
+
|
34
|
+
desc 'Run the asynchronous server example program'
|
35
|
+
task :async_server do
|
36
|
+
ruby '-Ilib examples/example_server_async.rb'
|
37
|
+
end
|
38
|
+
|
39
|
+
desc 'Run the server example program'
|
40
|
+
task :server do
|
41
|
+
ruby '-Ilib examples/example_server.rb'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
namespace :test do
|
46
|
+
Rake::TestTask.new(:base) do |test|
|
47
|
+
test.warning = true
|
48
|
+
test.verbose = true
|
49
|
+
test.test_files = FileList['test\test_win32_pipe.rb']
|
50
|
+
end
|
51
|
+
|
52
|
+
Rake::TestTask.new(:client) do |test|
|
53
|
+
test.warning = true
|
54
|
+
test.verbose = true
|
55
|
+
test.test_files = FileList['test\test_win32_pipe_client.rb']
|
56
|
+
end
|
57
|
+
|
58
|
+
Rake::TestTask.new(:server) do |test|
|
59
|
+
test.warning = true
|
60
|
+
test.verbose = true
|
61
|
+
test.test_files = FileList['test\test_win32_pipe_server.rb']
|
62
|
+
end
|
63
|
+
|
64
|
+
Rake::TestTask.new(:all) do |test|
|
65
|
+
test.warning = true
|
66
|
+
test.verbose = true
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
task :default => 'test:all'
|