diff --git a/example/coap_server.dart b/example/coap_server.dart index 9307b9ab..69835a6f 100644 --- a/example/coap_server.dart +++ b/example/coap_server.dart @@ -28,7 +28,7 @@ FutureOr main() async { ..respond( request, payload: Uint8List.fromList(utf8.encode('Hello World')), - responseCode: CoapCode.content, + responseCode: ResponseCode.content, contentFormat: CoapMediaType.applicationTdJson, ) ..close(); diff --git a/lib/src/coap_server.dart b/lib/src/coap_server.dart index 65bc3cdd..bafba6e5 100644 --- a/lib/src/coap_server.dart +++ b/lib/src/coap_server.dart @@ -91,7 +91,7 @@ abstract class CoapServer extends Stream { void respond( final CoapRequest request, { - required final CoapCode responseCode, + required final ResponseCode responseCode, final Uint8List? payload, final CoapMediaType? contentFormat, }); @@ -192,13 +192,13 @@ class _CoapUdpServer extends CoapServer { @override void respond( final CoapRequest request, { - required final CoapCode responseCode, + required final ResponseCode responseCode, final Uint8List? payload, final CoapMediaType? contentFormat, }) { final response = CoapResponse.createResponse( request, - CoapCode.content, + ResponseCode.content, CoapMessageType.ack, ) ..id = request.id