1 //
2 // Copyright (c) 2010-2023 Antmicro
3 //
4 // This file is licensed under the MIT License.
5 // Full license text is available in 'licenses/MIT.txt'.
6 //
7 
8 using System;
9 using Antmicro.Renode.Core;
10 
11 namespace Antmicro.Renode.Peripherals.Network
12 {
13     public interface IEmulatedNetworkService : IExternal, IDisposable
14     {
15         // This method is called when the modem disconnects from this emulated network
16         // service, either by closing the connection explicitly or on reset.
Disconnect()17         void Disconnect();
18 
Receive(int bytes)19         byte[] Receive(int bytes);
Send(byte[] data)20         bool Send(byte[] data);
21 
22         int BytesAvailable { get; }
23 
24         event Action<int> BytesReceived;
25 
26         string Host { get; }
27         ushort Port { get; }
28     }
29 }
30