Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
b2f11421
Commit
b2f11421
authored
Apr 25, 2022
by
Melledy
Browse files
Add getter for DispatchServer's HttpServer
parent
61447718
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java
View file @
b2f11421
...
@@ -43,6 +43,7 @@ public final class DispatchServer {
...
@@ -43,6 +43,7 @@ public final class DispatchServer {
public
String
regionListBase64
;
public
String
regionListBase64
;
public
HashMap
<
String
,
RegionData
>
regions
;
public
HashMap
<
String
,
RegionData
>
regions
;
private
HttpServer
server
;
public
DispatchServer
()
{
public
DispatchServer
()
{
this
.
regions
=
new
HashMap
<
String
,
RegionData
>();
this
.
regions
=
new
HashMap
<
String
,
RegionData
>();
...
@@ -54,6 +55,10 @@ public final class DispatchServer {
...
@@ -54,6 +55,10 @@ public final class DispatchServer {
this
.
initRegion
();
this
.
initRegion
();
}
}
public
HttpServer
getServer
()
{
return
server
;
}
public
InetSocketAddress
getAddress
()
{
public
InetSocketAddress
getAddress
()
{
return
address
;
return
address
;
}
}
...
@@ -200,7 +205,6 @@ public final class DispatchServer {
...
@@ -200,7 +205,6 @@ public final class DispatchServer {
}
}
public
void
start
()
throws
Exception
{
public
void
start
()
throws
Exception
{
HttpServer
server
;
if
(
Grasscutter
.
getConfig
().
getDispatchOptions
().
UseSSL
)
{
if
(
Grasscutter
.
getConfig
().
getDispatchOptions
().
UseSSL
)
{
HttpsServer
httpsServer
=
HttpsServer
.
create
(
getAddress
(),
0
);
HttpsServer
httpsServer
=
HttpsServer
.
create
(
getAddress
(),
0
);
SSLContext
sslContext
=
SSLContext
.
getInstance
(
"TLS"
);
SSLContext
sslContext
=
SSLContext
.
getInstance
(
"TLS"
);
...
...
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