我了解 Adobe 将在 2020 年 12 月停止支持 Flash。所有主要浏览器也可能会在 2020 年 12 月之后停止支持。我有一个 Adobe Flex/Flash 应用程序,目前正在使用中。考虑到上述事件,我有哪些选择?
我正在编写一个用于教育目的的超小型Web服务器.
对于以下代码,如果我请求包含图像的html页面,我无法在浏览器中看到该图像.我究竟做错了什么?
static void Main(string[] args)
{
TcpListener listener = new TcpListener(9999);
listener.Start();
while (true)
{
TcpClient client = listener.AcceptTcpClient();
string request = GetRequest(client.GetStream(),
client.ReceiveBufferSize);
WriteOutput(request, client.GetStream());
client.Close();
}
}
static void WriteOutput(string request, NetworkStream output)
{
try
{
string[] reqs = request.Split(' ');
WriteOutputHelper(output, reqs[1].Substring(1));
}
catch (Exception)
{
WriteOutputHelper(output, "404.html");
}
}
private static void WriteOutputHelper(NetworkStream output, string file)
{
byte[] statusLine = (new System.Text.ASCIIEncoding()).
GetBytes(GetStatusLine(file) + "\r\n\r\n");
output.Write(statusLine, 0, statusLine.Length);
byte[] ContentType =
(new System.Text.ASCIIEncoding()).GetBytes(GetContentType(file) +
"\r\n\r\n"); …Run Code Online (Sandbox Code Playgroud) 在C#中,string是引用类型.然后,
为什么我需要让我的交换函数具有ref参数?
swap(ref string first, ref string second) //swap(string first, string second) doesn't work
{
temp = first;
first = second
second = temp;
}
Run Code Online (Sandbox Code Playgroud) c# ×3
.net ×1
adobe ×1
apache-flex ×1
flash ×1
flex3 ×1
flex4 ×1
http ×1
http-headers ×1
maintenance ×1
string ×1
value-type ×1