Commit Graph

24 Commits

Author SHA1 Message Date
Max Romanov
e6cd1c4257 Go: http.Flusher implemented by unit.response.
This closes #133 issue on GitHub.
2018-07-12 15:50:43 +03:00
Igor Sysoev
313da403a5 Removed -mmacosx-version-min option. 2018-06-28 18:31:27 +03:00
Valentin Bartenev
1a52d876f7 Introduced nxt_length() macro. 2018-06-25 16:51:47 +03:00
Max Romanov
ad36c8ca8d Go: fixed request.Read() behaviour for EOF.
This closes #108 issue on GitHub.
2018-04-20 17:23:43 +03:00
Max Romanov
8934afee24 Go: Forced WriteHeader after application request processing.
Application should create response for every request.
If not, Unit package will do it.
2018-04-06 16:27:46 +03:00
Sergey Kandaurov
4f712e3fd0 Added support for shm_open(SHM_ANON) extension. 2018-03-06 13:55:51 +00:00
Igor Sysoev
c105988e51 Fixed DragonFly BSD shared memory implementation. 2018-01-11 17:13:58 +03:00
Igor Sysoev
8492ba945b Fixed Go package and PHP module building.
Go package and PHP module could not be built after changeset 5817734dd9b9.
2017-12-28 21:07:28 +03:00
Igor Sysoev
9a6d3c5775 HTTP keep-alive connections support. 2017-12-28 16:01:06 +03:00
Max Romanov
89c0f7c5db Implementing the ability to cancel request before worker starts processing it. 2017-12-27 17:46:17 +03:00
Max Romanov
799cff5f3e Introducing Unit version check in Go package.
To communicate with the Go program, Unit setup environment variable
named NXT_GO_PORTS with value contains Unit version, stream id to confirm
application is started, and Unit ports information.  Go Unit package parses
this string and compares runtime version with compile time version.  In case
of parse error or version mismatch, ListenAndServe() returns with the error.
2017-12-13 18:12:13 +03:00
Max Romanov
d14c0774c7 Go: removing request registry.
Passing unsafe.Pointers (void *) from Go to C is complicated by an attempt
to make such pointers less unsafe.

A straightforward optimization is to replace 'unsafe.Pointer' with 'uintptr'
(thanks to Xin Huang for the idea: https://stackoverflow.com/a/44826533 ).

As a result, request registry with mutex is gone.
2017-12-06 12:16:02 +03:00
Max Romanov
0db4d25316 Fixing Go package build in NetBSD.
Bug introduced in 585c8068a6d7.
2017-12-05 17:06:37 +03:00
Max Romanov
40eb1f8b9b Making Go package source distributable and renaming to 'nginx/unit'.
All header files are copied to Go package sources.  As the result,
package can be (re-)build when required.

This closes #23 issue on GitHub.
2017-12-01 16:57:30 +03:00
Max Romanov
ffb1c68609 Initializing port_msg fields with zeroes in Go package. 2017-12-01 16:51:30 +03:00
Max Romanov
fa76ea700f Fixing racing condition in request.msgs usage. 2017-10-27 11:05:37 +03:00
Max Romanov
1d11f8cfbb Fixing Go program crash.
Go request registration should be removed before C request memory freed.

C request address used as a key in Go map.  Freed memory can be instantly
reused for other request and older request registration should removed at this
point to avoid collisions.
2017-10-27 11:05:22 +03:00
Max Romanov
c8a8a7c212 Fixing Go package build.
Go package build was broken by change 365:28b2a468be43.
2017-10-19 18:20:08 +03:00
Max Romanov
6fd465f9d2 Introducing src_pid for mmap header for accurate buf completion.
This allows to use shared memory to communicate with main process.

This patch changes shared memory segment format and breaks compatibility
with older modules.
2017-10-19 17:36:45 +03:00
Max Romanov
4f7e00ef34 Fixing shared memory thread safety issue.
Do not reuse shared memory segment with different port until this segment
successfully received and indexed on other side. However, segment can be used
to transfer data via the port it was sent at any time.
2017-09-18 17:35:24 +03:00
Igor Sysoev
e5b4594376 Go: Fixed a bug introduced in the previous changeset. 2017-09-15 22:31:01 +03:00
Sergey Fedchenko
22c6805949 Cosmetic fixes in port.go.
This closes #5 on GitHub.
From 615369a29511c6021e5623070f082fdb17ff37a2
2017-09-08 14:10:23 -07:00
Igor Sysoev
58907888e5 Style fixes. 2017-09-06 02:30:55 +03:00
Igor Sysoev
f0e9e3ace9 nginext has been renamed to unit. 2017-08-31 00:42:16 +03:00