[FEATURE]-CreateCommForDevice method should include eControlMethod.Http and return GenericHttpClient
We need to implement a different interface for this though. HTTP communications is inherently NOT a stream-based communication method, so it doesn't fit into the IBasicCommunications method.
PepperDash.Essentials.Core has a class GenericHttpClient which implements IBasicCommunication. The method CreateCommForDevice returns an IBasicCommunication.
Agreed.
We’ve talked about having a new interface called IRequestResponse or similar and having an override for CreateCommForDevice that returns an instance that implements that interface.
Also I’m not sure that there is a GenericHttpClient class that is feature complete. Regardless we would not be able to implement IBasicCommunication on such a class, because as Andrew has suggested, Http communication doesn’t match the streaming communication paradigm described by IBasicCommunication.
Thanks,
Neil Dorin Software Developer /SC PepperDash www.pepperdash.comhttp://www.pepperdash.com/
PepperDash Mobile Controlhttp://www2.pepperdash.com/learn-about-mobile-control™ - BYOD Crestron Control, no special app required
From: Andrew Welker @.> Sent: January 3, 2022 11:59 AM To: PepperDash/Essentials @.> Cc: Subscribed @.***> Subject: Re: [PepperDash/Essentials] [FEATURE]-CreateCommForDevice method should include eControlMethod.Http and return GenericHttpClient (Issue #880)
We need to implement a different interface for this though. HTTP communications is inherently NOT a stream-based communication method, so it doesn't fit into the IBasicCommunications method.
— Reply to this email directly, view it on GitHubhttps://github.com/PepperDash/Essentials/issues/880#issuecomment-1004290482, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AENNGSHPOFH5MDSPNQAVAZ3UUHWWJANCNFSM5LFZPFSQ. You are receiving this because you are subscribed to this thread.Message ID: @.@.>>
PepperDash.Essentials.Core has a class GenericHttpClient which implements IBasicCommunication. The method CreateCommForDevice returns an IBasicCommunication.
Yes, it does. Doesn't mean that it's correct or the right way to do this, which is why it hadn't already been implemented into the Comm Factory.