File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 22#include < iostream>
33
44int main () {
5- std::cout << " dcsctp version: " << version ().c_str () << std::endl;
5+ std::cout << " dcsctp version: " << dcsctp_cxx:: version ().c_str () << std::endl;
66
7- DcSctpSocket *socket = new_socket ();
7+ dcsctp_cxx:: DcSctpSocket *socket = dcsctp_cxx:: new_socket ();
88
99 if (socket) {
1010 std::cout << " Successfully created a socket." << std::endl;
@@ -13,14 +13,14 @@ int main() {
1313 return 1 ;
1414 }
1515
16- if (state (*socket) == SocketState::Closed) {
16+ if (dcsctp_cxx:: state (*socket) == dcsctp_cxx:: SocketState::Closed) {
1717 std::cout << " Socket is initially closed" << std::endl;
1818 } else {
1919 std::cout << " Socket is in an unexpected state" << std::endl;
2020 return 1 ;
2121 }
2222
2323 std::cout << " Socket is about to be deleted." << std::endl;
24- delete_socket (socket);
24+ dcsctp_cxx:: delete_socket (socket);
2525 return 0 ;
2626}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use dcsctp::api::Options;
33use dcsctp:: api:: SocketState as DcSctpSocketState ;
44use std:: time:: Instant ;
55
6- #[ cxx:: bridge]
6+ #[ cxx:: bridge( namespace = "dcsctp_cxx" ) ]
77mod ffi {
88 #[ derive( Debug ) ]
99 enum SocketState {
You can’t perform that action at this time.
0 commit comments