zoukankan      html  css  js  c++  java
  • 什么是 连接 connection ?

    原文: http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci555204,00.html

    1) In telecommunication and computing in general, a connection is the successful completion of necessary arrangements so that two or more parties (for example, people or programs) can communicate at a long distance. In this usage, the term has a strong physical (hardware) connotation although logical (software) elements are usually involved as well.


    A dialup (sometimes called a switched) connection is a telephonic arrangement that is set up only when needed, using shared, circuit-switched communication lines (as in "plain old telephone service"). A dedicated (sometimes called a non
    -switched) connection is a continuous, always available connection (familiar to users of Digital Subscriber Line or DSL service). A leased line is a line rented from a telephone company that provides dedicated connection between two points (such as a headquarters office and a manufacturing plant).

     

    2) In computer programming, a connection is the setting up of resources (such as computer memory and buffers) so that a particular object such as a database or file can be read or written to. Typically, a programmer encodes an OPEN or similar request to the operating system that ensures that system resources such as memory are set up, encodes READs and WRITES or similar requests, and then encodes a CLOSE when a connection is no longer needed so that the resources are returned to the system for other users.

    A closely related term is session, which is sometime used to distinguish the ability to communicate for some duration in a logical sense. In this usage, the connection is regarded as the physical setup and the session is regarded as the logical setup. A session could be terminated and the connection maintained with the expectation of a new session later.

     

    我觉得任何两台连接到Internet上的计算机其实都已经具有了physical connection,我们在代码中所做的一切都只是建立logical connection(其实就是session),这个logical connection建立的过程本质上是两个操作:

    1 - 在本机内分配资源;

    2 – 请求远端机器分配资源;

    对于持续连接,通信双方分配的资源不会立刻释放,而非持续连接在每一次通信之前建立,通信结束后立刻释放。资源的分配比较低效,所以持续连接一般可以提升性能。

    希望听听你们的意见。

  • 相关阅读:
    Java笔记6之三目运算符
    java笔记5之逻辑运算符以及&&与&的区别
    SAP CRM OData模型里的addressable为true的含义
    SAP CRM OData multiple origin Composition的测试
    重构老系统遗留代码的一些方法学习笔记
    SAP CRM系统里的附件存储逻辑
    如何用Postman创建SAP CRM的Opportunity业务数据
    另一种使用SAP SAT事务码对通过浏览器启动的应用的性能测量和分析方式
    SAP Hybris Commerce,CRM和C4C的登录语言选择
    SAP Hybris Commerce的页面路由实现
  • 原文地址:https://www.cnblogs.com/smwikipedia/p/1440655.html
Copyright © 2011-2022 走看看