转载:TCP handshake

http://www.omnisecu.com/tcpip/tcp-three-way-handshake.htm

TCP Three-way Handshake

ortant; visibility: hidden; z-index: 100000;” >

 

In this ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >lesson, you will learn how two TCP devices synchronize using three way ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >handshake (3 way handshake) and what are the three steps of a TCP three way handshake and how two TCP devices synchronize.

Before the sending device and the receiving device start the ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >exchange of data, both devices need to be synchronized. During the TCP initialization process, the sending device and the receiving device exchange a few control packets for synchronization purposes. This exchange is known as a three-way handshake.

The three-way handshake begins with the initiator sending a TCP segment with the SYN control bit flag set.

TCP allows one side to establish a ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >connection. The other side may either accept the connection or refuse it. If we consider this from application layer point of view, the side that is establishing the connection is the client and the sideortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >waiting for a connection is the ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >server.

TCP identifies two types of OPEN calls:

Active Open. In an Active Open call a device (client process) using TCP takes the active role and initiates theconnection by sending a TCP SYN ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >message to start the connection.

Passive Open A passive OPEN can specify that the device (server process) is waiting for an active OPEN from a specific client. It does not generate any TCP message segment. The server processes listening for the clients are in Passive Open mode.

Transmission Control Protocol TCP Three Way Handshake

TCP Three-way Handshake

Step 1. Device A (Client) sends a TCP segment with SYN = 1, ACK = 0, ISN (ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >Initial Sequence ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >Number) = 2000.

The Active Open device (Device A) sends a segment with the SYN flag set to 1, ACK flag set to 0 and an InitialSequence Number 2000 (For Example), which marks the beginning of the sequence ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >numbers for data that device A will transmit. SYN is short for SYNchronize. SYN flag announces an attempt to open a connection. The first byte transmitted to Device B will have the sequence number ISN+1.

Step 2. Device B (Server) receives Device A’s TCP segment and returns a TCP segment with SYN = 1, ACK = 1, ISN = 5000 (Device B’s Initial Sequence Number), Acknowledgment Number = 2001 (2000 + 1, ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >the next sequence numberDevice B expecting from Device A).

Step 3. Device A sends a TCP segment to Device B that acknowledges receipt of Device B’s ISN, With flags set as SYN = 0, ACK = 1, Sequence number = 2001, Acknowledgment number = 5001 (5000 + 1, the next sequence numberDevice A expecting from Device B)

This handshaking technique is referred to as the Three-way handshake or SYN, SYN-ACK, ACK.

After the three-way handshake, the connection is open and the participant ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >computers start sending data using the sequence and acknowledge numbers.

You have learned what is TCP three way hand shake (3 way handshake), the three steps of a TCP three wayhandshake and how two TCP devices synchronize. Click “Next” to continue.

Explicit implement of Interface

MSDN上提到implicit和Explicit的接口实现的时候。说它的作用只是用于实现多个接口,且这些接口有同名方法时, 明确指明是哪个接口的。

但实际上Explicit还有一个“用处”,当基类是隐式实现接口,而且调用的时候是用接口去调用的时候,子类可以用显式的实现来达到覆盖(new)的效果。换句话说,在作为接口使用时,Interface.fn()比单纯的fn()优先级要高。这不是不同接口间同名方法的差异,而是有接口和无接口的同名方法的差异。往往容易被忽略,尤其是面试的时候。。。

转载:从Outlook中直接拖邮件到sharepoint

这么好的文章居然被墙了,造福一下墙内人民。

Five out-of-the-box ways to get Email into SharePoint

Posted by Cameron Dwyer

One question I’ve been asked countless times is the native integration options of Outlook/Exchange and SharePoint in order to save or transfer email and have it stored in SharePoint.

Before I jump into the different integration options available it is important to consider that once you’ve got the email in SharePoint how easy is it to get access to? and have we lost any information in the process? Let’s face it, if we can get the email into SharePoint but can’t access it again easily what have we achieved? Each of the methods I’ll discuss have implications on how easy is it to access the saved email and how much of the email (including it’s attributes) can be accessed after it has been transferred to SharePoint.

1. Manually Save an email message to SharePoint

Process

Treat the email as a file just like any other file that you would upload to SharePoint.

  • In Outlook open an email then select File | Save As…
  • Choose a format from the ‘Save as type’ drop down. I recommend saving it in Outlook Message Format (.msg)
  • image
  • Save the email (msg file) to a local drive
  • Now browse to the SharePoint list/library through the web browser and upload the file through the native SharePoint UI.

Pros

  • Upload occurs through native SharePoint UI so you will have the opportunity to set content type, enter/select column values, apply validation, trigger custom event handlers etc
  • The email is stored in msg format so it can be opened back up in Outlook without loss of data or email integrity.
  • You are left with the item open in the SharePoint UI so you can continue working on it (e.g. start a workflow)

Cons

  • Very time consuming and laborious
  • The entire process has to be repeated for each email, can’t do multiple at once
  • No email attributes get prompted to SharePoint columns

2. Email enable a SharePoint List or Library

Process

Selected SharePoint lists & libraries can be enabled to receive incoming email on an email address that is unique to the list/library. Users can then include the email address of the SharePoint list with the recipients of an email to have the email stored in SharePoint.

Great post from Joel Olsen for more detail on email enabled lists/libraries (SP2007)http://blogs.msdn.com/b/joelo/archive/2007/10/23/email-enabled-lists-and-inbound-email.aspx

Pros

  • Quick and simple method for the user to get the email into SharePoint
  • From a governance point of view only selected lists/libraries can be configured to accept incoming email

Cons

Further reading

Configure incoming e-mail (SharePoint otMTAzMi02Mjg2MjpjYW1lcm9uZHd5ZXIud29yZHByZXNzLmNvbTowOjA6MTM3ODg4OTQzNDYzOA” rel=”nofollow” href=”http://camerondwyer.wordpress.com/2012/01/04/five-out-of-the-box-ways-to-get-email-into-sharepoint/#” >Server 2010)

http://technet.microsoft.com/en-us/library/cc262947.aspx

Configuring incoming email in SharePoint 2010 with Exchange – Step by Step Guide

http://sharepointgeorge.com/2010/configuring-incoming-email-sharepoint-2010/

Enable and configure e-mail support for a list or library (SharePoint 2007/WSS 3.0)

http://office.microsoft.com/en-us/sharepoint-server-help/enable-and-configure-e-mail-support-for-a-list-or-library-HA010082307.aspx

3. Map a drive to a SharePoint Library

Process

It’s possible to map a network drive (or create a shortcut to a network location) to provide access to the content of a SharePoint library in Windows Explorer much like it is just another directory structure on a file server.

For example, I have a library located at http://vs-server82/subsite/Email

image

I can map a drive to \\vs-server82\subsite1\email

You can also just bring up the run command and enter the location in directly \\vs-server82\subsite1\email

Either of these techniques should result in Windows Explorer displaying the contents of the library

image

You can now drag and drop email messages from Outlook into the Windows Explorer window and the files will be saved to SharePoint.

image

Pros

  • If you are trying to do a simplistic transfer of multiple emails from Outlook to a single SharePoint library with no setting of SharePoint column values than this might be sufficient. I’d see it more as an ad-hoc or one-off technique to get you out of trouble rather than a technique to rely on day-in-day out.
  • Email is saved in .msg format

Cons

  • Only works for libraries (you can see lists, but due to the way list items and there attachments are stored it’s not really useable)
  • Provides a very rudimentary interface to SharePoint and you may encounter problems with SharePoint specific functionality in some libraries (such as check in, check out, validation)
  • No SharePoint column values set
  • I’ve come across several discussion threads that warn against modifying SharePoint content accessed through this technique (see further reading links below)
  • Allowing (or promoting the use of this technique) may circumvent controls that have been put in place in SharePoint for data validation and document management

Further reading

http://groups.google.com/group/microsoft.public.sharepoint.windowsservices/browse_thread/thread/318840f24128a15d/ad1b6fed50ce630a%23ad1b6fed50ce630a?pli=1

https://www.nothingbutsharepoint.com/sites/eusp/Pages/can-i-map-a-document-library-as-a-mapped-drive.aspx

4. Use the SharePoint WebDav View

Process

In the SharePoint 2010 Library ribbon there is an option to ’Open with Explorer’.

image

This will open Window Explorer and display the contents of the current SharePoint library in an almost identical way the the previous technique of using a mapped drive. Again you can drag and drop email from Outlook into the Explorer Window.

Pros

  • Similar to the previous technique but I would recommend this over the previous technique as it is using the WebDav standard for communicating with SharePoint
  • Email saved in .msg format

Cons

  • WebDav only goes so far, it’s a standard that existed long before SharePoint so as you would expect it only supports a very basic subset of SharePoint functionality
  • No SharePoint column values set
  • Known issues in an environment with a load balancer
  • Allowing (or promoting the use of this technique) may circumvent controls that have been put in place in SharePoint for data validation and document management

Further reading

http://support.microsoft.com/kb/2388749

http://ballyhoo4u.com/disable-open-in-windows-explorer-on-sharepoint/

5. Use a Discussion Forum

Process

It is possible to connect a SharePoint discussion board to Outlook to obtain the ability to drag/drop email to the discussion board.

    • Ensure incoming email is enabled on your farm
    • Create a discussion board in SharePoint

image

  • From within SharePoint, open the discussion board you just created and click on Connect to Outlook in the ribbon.

image

  • The discussion board will now appear in Outlook under ‘SharePoint Lists’

image

    • You can now drag and drop emails to the discussion board from within Outlook, and they will be copied across to SharePoint
    • You can view the contents of the discussion in Outlook (emails are converted to posts). One gotcha is that if you have automatic signatures setup then the post that is created will have your signature added to it (just as though you forwarded the original email) – see screenshot below. I’m sure with some tinkering you could probably come up with a solution for this.

image

Pros

  • Simple drag/drop method for the user to get the email into SharePoint
  • User self-service (not ongoing administration required to setup/maintain)
  • Discussion board content visible from Outlook or SharePoint

Cons

  • Email is not stored in .msg file format
  • No SharePoint column values set
  • Integrity of the email message is not preserved (that is you can never open it back up in Outlook as an email)

Further reading

http://blog.mikehacker.net/2011/05/02/drag-and-drop-email-from-outlook-to-sharepoint/

 

Update for SharePoint 2013 – There is an option 6 – Site Mailboxes

Now that SharePoint 2013 has arrived, it has opened up a new native option called SharePoint Site Mailboxes. Rather than try to edit this article and explain what Site Mailboxes are all about I’ve created a new article dedicated just to SharePoint 2013 Site Mailboxes.

 

Wrap up

If one of the techniques above fits your requirement then you are in luck and will be able to achieve Outlook/SharePoint integration natively. If you require more advanced functionality (such as automatic capture of email attributes to SharePoint columns, ability for user to tag or enter column values during save etc) then you are looking at 3rd party products or custom development. If you find yourself at this stage I recommend taking a look at OnePlaceMail. TheExpress Edition of OnePlaceMail is entirely free (no trial or evaluation period) and can be used by up to 25 users within a company. OnePlaceMail provides a far superior integration between Outlook and SharePoint/Office 365 than any of the native options and is built to address the lack (overcome the ‘cons’) of native integration options.