Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
b1208d3f
Commit
b1208d3f
authored
Feb 10, 2016
by
Vadim Petrov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New function DialWithDialer to create FCGIClient with custom Dialer.
parent
b089d14b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
middleware/fastcgi/fcgiclient.go
middleware/fastcgi/fcgiclient.go
+9
-4
No files found.
middleware/fastcgi/fcgiclient.go
View file @
b1208d3f
...
...
@@ -169,12 +169,11 @@ type FCGIClient struct {
reqID
uint16
}
// Dial
connects to the fcgi responder at the specified network address
.
// Dial
WithDialer connects to the fcgi responder at the specified network address, using custom net.Dialer
.
// See func net.Dial for a description of the network and address parameters.
func
Dial
(
network
,
address
string
)
(
fcgi
*
FCGIClient
,
err
error
)
{
func
Dial
WithDialer
(
network
,
address
string
,
dialer
net
.
Dialer
)
(
fcgi
*
FCGIClient
,
err
error
)
{
var
conn
net
.
Conn
conn
,
err
=
net
.
Dial
(
network
,
address
)
conn
,
err
=
dialer
.
Dial
(
network
,
address
)
if
err
!=
nil
{
return
}
...
...
@@ -188,6 +187,12 @@ func Dial(network, address string) (fcgi *FCGIClient, err error) {
return
}
// Dial connects to the fcgi responder at the specified network address, using default net.Dialer.
// See func net.Dial for a description of the network and address parameters.
func
Dial
(
network
,
address
string
)
(
fcgi
*
FCGIClient
,
err
error
)
{
return
DialWithDialer
(
network
,
address
,
net
.
Dialer
{})
}
// Close closes fcgi connnection
func
(
c
*
FCGIClient
)
Close
()
{
c
.
rwc
.
Close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment