@@ -5,7 +5,7 @@ use crate::adapters::tcp::{TcpAdapter};
5
5
#[ cfg( feature = "tcp" ) ]
6
6
use crate :: adapters:: framed_tcp:: { FramedTcpAdapter } ;
7
7
#[ cfg( feature = "udp" ) ]
8
- use crate :: adapters:: udp:: { self , UdpAdapter } ;
8
+ use crate :: adapters:: udp:: { self , UdpAdapter , UdpConfig } ;
9
9
#[ cfg( feature = "websocket" ) ]
10
10
use crate :: adapters:: ws:: { self , WsAdapter } ;
11
11
@@ -160,7 +160,7 @@ impl std::fmt::Display for Transport {
160
160
pub enum TransportConnect {
161
161
Tcp ,
162
162
FramedTcp ,
163
- Udp ,
163
+ Udp ( UdpConfig ) ,
164
164
Ws ,
165
165
}
166
166
@@ -169,7 +169,7 @@ impl TransportConnect {
169
169
let transport = match self {
170
170
Self :: Tcp => Transport :: Tcp ,
171
171
Self :: FramedTcp => Transport :: FramedTcp ,
172
- Self :: Udp => Transport :: Udp ,
172
+ Self :: Udp ( _ ) => Transport :: Udp ,
173
173
Self :: Ws => Transport :: Ws ,
174
174
} ;
175
175
@@ -182,7 +182,7 @@ impl From<Transport> for TransportConnect {
182
182
match transport {
183
183
Transport :: Tcp => Self :: Tcp ,
184
184
Transport :: FramedTcp => Self :: FramedTcp ,
185
- Transport :: Udp => Self :: Udp ,
185
+ Transport :: Udp => Self :: Udp ( UdpConfig :: default ( ) ) ,
186
186
Transport :: Ws => Self :: Ws ,
187
187
}
188
188
}
@@ -191,7 +191,7 @@ impl From<Transport> for TransportConnect {
191
191
pub enum TransportListen {
192
192
Tcp ,
193
193
FramedTcp ,
194
- Udp ,
194
+ Udp ( UdpConfig ) ,
195
195
Ws ,
196
196
}
197
197
@@ -200,7 +200,7 @@ impl TransportListen {
200
200
let transport = match self {
201
201
Self :: Tcp => Transport :: Tcp ,
202
202
Self :: FramedTcp => Transport :: FramedTcp ,
203
- Self :: Udp => Transport :: Udp ,
203
+ Self :: Udp ( _ ) => Transport :: Udp ,
204
204
Self :: Ws => Transport :: Ws ,
205
205
} ;
206
206
@@ -213,7 +213,7 @@ impl From<Transport> for TransportListen {
213
213
match transport {
214
214
Transport :: Tcp => Self :: Tcp ,
215
215
Transport :: FramedTcp => Self :: FramedTcp ,
216
- Transport :: Udp => Self :: Udp ,
216
+ Transport :: Udp => Self :: Udp ( UdpConfig :: default ( ) ) ,
217
217
Transport :: Ws => Self :: Ws ,
218
218
}
219
219
}
0 commit comments