Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
Tenjin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nawasan Wisitsingkhon
Tenjin
Commits
0f8e3af1
Commit
0f8e3af1
authored
Jun 19, 2024
by
Nawasan Wisitsingkhon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change port; change log
parent
ea2a7e34
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
main.rs
src/main.rs
+1
-1
controller_frame.rs
src/openflow/ofp10/controller_frame.rs
+1
-0
tcp_listener.rs
src/openflow/ofp10/tcp_listener.rs
+1
-1
No files found.
src/main.rs
View file @
0f8e3af1
...
...
@@ -3,6 +3,6 @@ use tenjin::{openflow::ofp10::ControllerFrame10, Controller};
extern
crate
byteorder
;
fn
main
()
->
Result
<
(),
std
::
io
::
Error
>
{
Controller
::
listener
(
"127.0.0.1:66
3
3"
);
Controller
::
listener
(
"127.0.0.1:66
5
3"
);
Ok
(())
}
src/openflow/ofp10/controller_frame.rs
View file @
0f8e3af1
...
...
@@ -17,6 +17,7 @@ pub trait ControllerFrame10 {
fn
new
()
->
Self
;
fn
listener
(
address
:
&
str
)
{
println!
(
"server run at {}"
,
address
);
let
_
=
tcp_listener_handler
(
address
);
}
...
...
src/openflow/ofp10/tcp_listener.rs
View file @
0f8e3af1
...
...
@@ -10,7 +10,7 @@ pub fn tcp_listener_handler(address: &str) -> Result<(), std::io::Error> {
for
stream
in
listener
.incoming
()
{
match
stream
{
Ok
(
mut
stream
)
=>
{
if
let
Ok
(
addr
)
=
stream
.
local
_addr
()
{
if
let
Ok
(
addr
)
=
stream
.
peer
_addr
()
{
println!
(
"server has connection from {}"
,
addr
);
}
...
...
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