Allows applications to send trackback pings by using the Trackback peer-to-peer communication protocol.
Namespace:
Argotic.Core.NetAssembly: Argotic.Core (in Argotic.Core)
Version: 2007.3.0.0 (2007.3.0.0)
Syntax
| C# |
|---|
public class TrackbackClient : IDisposable |
| Visual Basic (Declaration) |
|---|
Public Class TrackbackClient _ Implements IDisposable |
| Visual C++ |
|---|
public ref class TrackbackClient : IDisposable |
Remarks
See http://www.sixapart.com/pronet/docs/trackback_spec for more information about the Trackback peer-to-peer communication specification.
Examples
The following code example demonstrates the usage of TrackbackClient.
CopyC#
using System; using System.Text; using Argotic.Core.Net; namespace Argotic.Test { public class TrackbackClientCS { public TrackbackClientCS() { //------------------------------------------------------------ // Initialize the trackback client //------------------------------------------------------------ TrackbackClient client = new TrackbackClient(); client.Timeout = TimeSpan.FromSeconds(10); //------------------------------------------------------------ // Define the trackback ping message to send //------------------------------------------------------------ TrackbackMessage message = new TrackbackMessage(); message.Permalink = new Uri("http://www.bar.com/"); message.Encoding = Encoding.UTF8; message.Title = "Foo Bar"; message.BlogName = "Foo"; message.Excerpt = "My Excerpt"; //------------------------------------------------------------ // Send the trackback ping //------------------------------------------------------------ TrackbackResponse pingResponse; Uri trackbackServiceHost = new Uri("http://www.example.com/trackback/5"); pingResponse = client.Send(trackbackServiceHost, message); //------------------------------------------------------------ // Determine if trackback ping was sucessful //------------------------------------------------------------ if(pingResponse.HasError) { //------------------------------------------------------------ // Get reason provided for trackback ping failure //------------------------------------------------------------ string reasonForPingFailure = pingResponse.Message; } } } }
